Powershell on Ubuntu 18.04

Unfortunately powershell isn’t currently available in the official package repository. However Microsoft do provide a couple of ways to install powershell.

DEB Package

Microsoft provide a .deb package for manual installation using the APT package manager.

Download with the package with:

$ wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb

Then install with:

$ sudo apt install ./packages-microsoft-prod.deb

Update the repository cache with:

$ sudo apt update

Install powershell with:

$ sudo apt install powershell

Lastly you can confirm its installed by checking the version number:

$ pwsh --version
PowerShell 6.2.4


Alternately you can install powershell using the snap package manager:

$ sudo apt update
$ sudo apt install snapd
$ sudo snap install powershell --classic

Check its installed correctly by checking the version number:

$ pwsh --version
PowerShell 6.2.4

Be the first to comment

Leave a Reply