Installing Powershell in Ubuntu 19.04

Before you ask.. why?! The reasoning behind this was simply scientific interest (And the “/usr/bin/pwch could not be found” error in Visual Studio Code was getting annoying while writing some Powershell scripts from my Desktop!)

Installing Pre-requisits:

The article below from the Microsoft does not cover installing the pre-requisits for installing Powershell on Ubuntu – I have written this guide to save you scowering the internet for the packages.

sudo dpkg -i libssl1.0.0_1.0.2n-1ubuntu6_amd64.deb
sudo add-apt-repository "deb xenial-security main"
sudo apt-get update
sudo apt-get install libicu55

You can now proceed with the instructions from the Microsoft article (Below for your convenience):

Powershell Install:

wget -q
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install -y powershell

You can now run Powershell with the pwsh command:

[email protected]:~$ pwsh 
PowerShell 6.2.3
Copyright (c) Microsoft Corporation. All rights reserved.
Type 'help' to get help.

PS /home/tim>

Microsoft Documentation:

Any comments or questions? Get in touch here or Email me at [email protected]