Table of Contents
Install Microsoft PowerShell 6.2.0 on Ubuntu 18.04
Microsoft PowerShell is an opensource and cross-platform tool that includes an interactive command-line shell and scripting environment. Microsoft PowerShell is developed to perform configuration management and automation of repetitive tasks. On Ubuntu, you can install the Microsoft PowerShell Package by using the
snappy package manager. In this tutorial, you are going to learn how to install Microsoft PowerShell 6.2.0 on Ubuntu 18.04.
Before you start to Install Microsoft PowerShell 6.2.0 on Ubuntu 18.04. You must have the non-root user account on your system with sudo privileges.
Install PowerShell on Ubuntu
Microsoft PowerShell is made available to Ubuntu users by
snap package. So we are going to install it by using the
snappy package manager.
First, open the terminal application by pressing
Ctrl+Alt+t keys same time.
Now update the
apt package manager index by typing following command in the terminal:
sudo apt update
Next, we need to install
snapd-xdg-open packages in order to install Snappy package manager if its not installed on your system. To install Snappy package manager on your system run following command in the terminal:
sudo apt install snapd snapd-xdg-open
After installing Snappy package manager we are here ready to install Microsoft PowerShell. To install Microsoft PowerShell classic version you should execute the following command:
sudo snap install powershell –classic
The above command will prompt you for authentication, please kindly enter the password for authentication to continue.
The output should be:
powershell 6.2.0 from 'microsoft-powershell' installed
Here, you have successfully installed Microsoft PowerShell on your system.
Activities -> type - Microsoft Powershelland clicking on the launcher icon when it appears.
You can also Launch PowerShell by using the Terminal application by using the following command: