PowerShell is now open source, and available for Linux and Mac. You can download official packages from Microsoft for the 64-bit versions of Ubuntu 16.04, Ubuntu 14.04, CentOS 7, Red Hat Enterprise Linux 7, and Mac OS X 10.11.
Download the Packages from Microsoft
Visit the PowerShell project’s Releases page on GitHub to find the packages. Download the appropriate one for your operating system:
- Ubuntu 16.04: Download the package ending in “16.04.1_amd64.deb”.
- Ubuntu 14.04: Download the package ending in “14.04.1_amd64.deb”.
- CentOS 7 and Red Hat Enterprise Linux 7: Download the package ending in “el7.centos.x86_64.rpm”.
- Mac: Download the package ending in “.pkg”.
How to Install PowerShell on Linux
With the package downloaded, launch a terminal window on your Linux desktop. You’ll now need to install the package’s dependencies and the package itself.
On Ubuntu 16.04, run the following commands:
sudo apt-get install libunwind8 libicu55 sudo dpkg -i /path/to/powershell.deb
So, if you downloaded the package “powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb” to the Downloads folder in your home folder, you’d run the following commands:
sudo apt-get install libunwind8 libicu55 sudo dpkg -i ~/Downloads/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
Note that you can use tab completion to speed up this process. For example, if the file was in your Downloads folder, you’d type ~/Downloads/powershell and then press Tab. Bash will automatically complete the file name if it’s the only file that starts with “powershell” in that directory.
On Ubuntu 14.04, run the following commands:
sudo apt-get install libunwind8 libicu52 sudo dpkg -i /path/to/powershell.deb
On CentOS 7, run the following commands:
sudo yum install /path/to/powershell.rpm
If all goes well, PowerShell should now be installed on your system.
How to Install PowerShell on a Mac
To install PowerShell on a Mac, just double-click the downloaded .pkg file. It will launch a package installer and install PowerShell like any other application.
At the moment, the package doesn’t appear to be signed, so you’ll have to bypass Gatekeeper to install it. To do so, right-click or Ctrl-click the file .pkg, select “Open”, and agree to run the installer.
How to Launch PowerShell on Linux or Mac
Open a terminal and run the “powershell” command to access a PowerShell shell environment. This works on both Linux and Mac–whichever you’re using.
You’ll see a PowerShell prompt beginning with “PS”, and you can run PowerShell cmdlets just as you would on Windows.
To leave the PowerShell prompt, just type “exit” and press Enter or close the terminal window.
PowerShell are for everyone, including Microsoft, Linux, and, yes, even MacOS users. In this article we will be covering all required steps to get your MacOS ready to manage Microsoft Azure cloud using PowerShell! Microsoft is committed to cross-platform interoperability, and using PowerShell Core 6.x, which is based on the .NET standard library, they achieved that by introducing a new module that is supported on all platforms.
If you are a MacOS user, there are plenty of tools for you, including Visual Studio, Azure CLI, Azure Storage Explorer, and of course, PowerShell!! So now you can socialize in Starbucks and manage Azure in your MacOS just fine.