Install PowerShell on Linux or OS X - A Step-by-Step Guide

PowerShell Cross-Platform Availability
PowerShell has transitioned to an open-source model. This means it is now accessible on operating systems beyond Windows.
Specifically, official packages are provided by Microsoft for Linux and macOS environments.
Supported Operating Systems
The current availability extends to the 64-bit architectures of several popular distributions.
- Ubuntu 16.04
- Ubuntu 14.04
- CentOS 7
- Red Hat Enterprise Linux 7
- Mac OS X 10.11
Users of these systems can obtain PowerShell directly from Microsoft, ensuring compatibility and reliability.
This expansion significantly broadens the reach of PowerShell, allowing administrators and developers to leverage its capabilities across a wider range of platforms.
Acquiring the Necessary Packages from Microsoft
The PowerShell project’s releases can be located on its GitHub page. From there, obtain the package designed for your specific operating system.
Available Packages
The following packages are available for download:
- Ubuntu 16.04: Select the package with the suffix "16.04.1_amd64.deb".
- Ubuntu 14.04: Choose the package identified by the suffix "14.04.1_amd64.deb".
- CentOS 7 and Red Hat Enterprise Linux 7: Download the package concluding with "el7.centos.x86_64.rpm".
- Mac: The appropriate package will have the extension ".pkg".
Ensure you download the correct package to guarantee a successful installation. Selecting the wrong package may lead to compatibility issues.

This image illustrates the download location and package types available.
Installing PowerShell on Linux Systems
Once the necessary package has been downloaded, open a terminal window within your Linux environment. The subsequent step involves installing both the package’s dependencies and the package itself.
For installations on Ubuntu 16.04, execute these commands:
sudo apt-get install libunwind8 libicu55sudo dpkg -i /path/to/powershell.deb
Consider the scenario where the package, named "powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb", was saved to the Downloads directory within your home folder. The commands would then be:
sudo apt-get install libunwind8 libicu55sudo dpkg -i ~/Downloads/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
To expedite the process, leverage tab completion functionality. For instance, typing "~/Downloads/powershell" followed by the Tab key will automatically complete the filename if it’s the sole file beginning with "powershell" in that directory.
Visual Confirmation

Users of Ubuntu 14.04 should utilize the following commands:
sudo apt-get install libunwind8 libicu52sudo dpkg -i /path/to/powershell.deb
For CentOS 7 systems, the installation process is as follows:
sudo yum install /path/to/powershell.rpm
Upon successful completion of these steps, PowerShell should be fully installed and operational on your Linux system.
Installing PowerShell on macOS
The process of installing PowerShell on a Mac is straightforward. Simply initiate the installation by double-clicking the downloaded .pkg file.
This action will launch the package installer, proceeding with the installation of PowerShell in a manner consistent with other applications.
Bypassing Gatekeeper
Currently, the installation package is not digitally signed. Consequently, users must circumvent Gatekeeper security protocols to complete the installation.
To bypass Gatekeeper, right-click (or Ctrl-click) the .pkg file and select "Open". You will then be prompted to confirm that you wish to run the installer.
Confirming this action will allow the installation to proceed.
Initiating PowerShell on Linux and macOSPowerShell can be readily launched on both Linux and macOS operating systems. This allows users to leverage its capabilities across different platforms.
Accessing a PowerShell shell environment is achieved by simply executing the "powershell" command within a terminal. This method is consistent regardless of whether you are using a Linux or macOS system.
Upon successful execution, a PowerShell prompt will appear, denoted by the "PS" prefix. From this point, you can utilize PowerShell cmdlets in the same manner as you would within a Windows environment.
To terminate the PowerShell session, simply type "exit" and press the Enter key. Alternatively, closing the terminal window will also achieve the same result.
Further comprehensive details regarding PowerShell are available on the project’s official GitHub page. This resource provides access to the source code, issue reporting mechanisms, and extensive official documentation.
Resources for Further Exploration
- Source code and issue tracking can be found on the PowerShell GitHub repository.
- Detailed documentation is also accessible through the official GitHub page.
The GitHub page serves as a central hub for developers and users seeking in-depth information about PowerShell.