Short Bytes: Microsoft has open sourced the code of its command line shell and scripting language PowerShell, bringing this automation framework to Linux and OS X. By downloading the appropriate package from PowerShell’s GitHub page and running a couple of commands, you can easily install the application on Ubuntu, CentOS, and OS X.
Currently, apart from Windows operating system, PowerShell is available on Ubuntu, CentOS, RHEL, and OS X. Microsoft has also promised that this initial release will be followed by support for further distros.
Today, I’m going to tell you how to get PowerShell up and running on your Linux distro and OS X operating system.
How to install PowerShell in Linux — Ubuntu, and CentOS
To get started with the PowerShell installation process, you need to visit PowerShell’s Github page and find the appropriate package for installation. Depending upon your operating system, download the packages:
Installing PowerShell on Ubuntu 16.04:
After downloading the package ending with 16.04.1_amd64.deb, run the following commands in a Terminal window:
Installing PowerShell on Ubuntu 14.04:
Once you have downloaded the package ending with 14.04.1_amd64.deb, run the following commands in a Terminal window:
Installing PowerShell on CentOS 7:
Download the package ending with el7.centos.x86_64.rpm and run the following command in your Terminal:
How to install PowerShell in OS X?
For installing Microsoft PowerShell on a Mac, you don’t need to run any commands in your terminal. Simply download the package ending with .pkg and double-click the file.
This will launch the installer and install the application within seconds.
How to run/launch Powershell on OS or Linux?
After successfully installing PowerShell on your Linux or OS X system, simply open Terminal and run the following command:
Here are the screenshots of my systems:
For leaving the PowerShell window, type “exit” command and press Enter. You can also close the terminal window to end your session.
If you are interested in grabbing the source code or getting more official documentation, visit PowerShell GitHub page.
Did you find this article helpful? Don’t forget to drop your feedback in the comments section below.
Also Read: Microsoft Open Sources “Checked C” — An Extended Version Of C