To install Microsoft PowerShell in Debian 9, run
apt-get update apt-get install curl gnupg apt-transport-https
Install GPG keys
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
Add repository
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > /etc/apt/sources.list.d/microsoft.list
Install powershell
apt-get update && apt-get install -y powershell
To start powershell, run
pwsh
Leave a Reply