See How To Install Microsoft PowerShell On Ubuntu and CentOS


Last week was a happy one for open source lovers as more great news came from the house of Microsoft: The company gave an official announcement that it is open sourcing its command line shell and scripting language PowerShell (a widely used automation framework that is build on the .NET framework) to share the code for OS X and Linux distros on GitHub.

Right now, apart from the Windows OS, PowerShell is available on Ubuntu, OS X, CentOS and RHEL and Microsoft went on to promise that this initial release will be followed by support for more distros.

Today,we will tell you how to get PowerShell running on your Linux distro.

Installing PowerShell in Ubuntu and CentOS

The first thing you need to do to get started with the PowerShell installation process is to visit PowerShell’s Github page and find the appropriate package for installation. The download packages depend on your Operating System.

Installing PowerShell on Ubuntu 16.04:
When you’re done downloading the package ending with 16.04.1_amd64.deb, run the following commands in a Terminal window:

sudo apt-get install libunwind8 libicu55

sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb

Installing PowerShell on Ubuntu 14.04:
Now that you have downloaded the package ending with 14.04.1_amd64.deb, run the following commands in a Terminal window:

sudo apt-get install libunwind8 libicu52

sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.14.04.1_amd64.deb

Installing PowerShell on CentOS 7:
Download the package ending with el7.centos.x86_64.rpm and run the command below in your Terminal:

sudo yum install /path/to/powershell.rpm

Launching Powershell on Linux
After successfully installing PowerShell on your Linux system open a Terminal and run the following command:

To exit the PowerShell window, type “exit” and press Enter. You can also just close the terminal window to end your session.

We hope you found this guide helpful. If you would like to lay your hands on the source code or access more official documentation visit the PowerShell GitHub page.

About The Author
Martins Okoi
Computer Science enthusiasts with a passion for learning new things. In my spare time, I listen to music, read like a compiler, and learn like an A.I algorithm.

Leave a Response