×


Install PowerShell on Linux Mint 20.3 Una system - Step by step guide ?

PowerShell originally is a Windows operating system’s utility that can act as a full-fledged command line interface along with supporting shell scripting (for learning more about PowerShell, you can visit the link mentioned over here: https://docs.microsoft.com/en-us/powershell/). However, it does not mean that you cannot have this utility installed on any operating system other than Windows. 

Here at Ibmi Media, we shall look into the process of installing PowerShell on a Linux Mint 20.3 system.

To Install Microsoft PowerShell on Ubuntu 20.04, visit: https://linuxapt.com/blog/162-install-microsoft-powershell-on-ubuntu-20-0


Steps to install PowerShell on Linux Mint 20.3

1. Enable snapd on the system

On Linux Mint 20, /etc/apt/preferences.d/nosnap.pref needs to be removed before Snap can be installed. This can be accomplished from the command line:

$ sudo rm /etc/apt/preferences.d/nosnap.pref
$ sudo apt update

To install snap from the Software Manager application, search for snapd and click Install.

Alternatively, snapd can be installed from the command line:

$ sudo apt update
$ sudo apt install snapd

Either restart your machine, or log out and in again, to complete the installation.

Next, you can verify that Snap Package Manager exists on your system with the below command:

$ snap --version


2. Install PowerShell on the system

Now, you can install PowerShell on your system with the help of the following command:

$ sudo snap install powershell --classic


How to launch PowerShell on Linux Mint 20.3 ?

To launch PowerShell on a Linux Mint 20.3 system, you simply need to run the following command in the terminal:

$ sudo pwsh

Now you will see PowerShell interface.


How to exit from PowerShell on Linux Mint 20.3 ?

For exiting from the PowerShell interface on a Linux Mint 20.3 system, you will have to execute the command stated below:

> exit


How to uninstall PowerShell from Linux Mint 20.3 ?

Now, if you want to remove PowerShell from Linux Mint 20.3, then you need to run the following command:

$ sudo snap remove powershell


[Need help in fixing Linux mint system issues ? We can help you. ]


Conclusion

This article covers how to easily Install PowerShell on Linux Mint system. In fact, PowerShell is commonly used for automating the management of systems. It is also used to build, test, and deploy solutions, often in CI/CD environments.