๐ŸงLinux

Installing PowerShell in Linux is easier than you think

This article is covered in a GeeksForGeeks article, here's the link: https://www.geeksforgeeks.org/how-to-install-powershell-in-linux/

Using Snap

Installing PowerShell Using Snap is as per the following:

Using a package repository ( apt )

First update list of system packages using below command:

sudo apt-get update

Install pre-requisite packages using the below command:

sudo apt-get install -y wget apt-transport-https software-properties-common

Now download the Microsoft repository GPG keys and register them:

wget -q https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb

Update system source and enable universe repositories:

sudo apt-get update
sudo add-apt-repository universe

Finally, install PowerShell using the below command.

sudo apt-get install -y powershell

You can test PowerShell functionality using the pwsh command in your terminal.

Last updated