🐧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:

Installing PowerShell using snap ( image from GeeksForGeeks )

Using a package repository ( apt )

First update list of system packages using below command:

Update system source ( image from GeeksForGeeks )

Install pre-requisite packages using the below command:

Installing pre-requisite packages ( image from GeeksForGeeks )

Now download the Microsoft repository GPG keys and register them:

Registering GPG key ( image from GeeksForGeeks )

Update system source and enable universe repositories:

Enable universe repositories ( image from GeeksForGeeks )

Finally, install PowerShell using the below command.

Installing PowerShell ( image from GeeksForGeeks )

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

Starting PowerShell ( image from GeeksForGeeks )

Last updated

Was this helpful?