Share via


Step-by-Step: Getting Started with PowerShell on Linux

Hello Folks,

On August 18, 2016,  the PowerShell Team announced that we were now providing PowerShell as an open source project on GitHub, available on Windows, Linux and macOS! The official announcement blog can be found here and the PowerShell Webinar is here.

Why did we make PowerShell open source??

In the cloud era, when talking to customers, it became very clear that since you (our customers) live in an heterogeneous world, you want to be able to use any client to manage any workloads on any servers and on any cloud.  That’s why we made PowerShell an open source project.

PowerShell on Windows, Linux and MacOS now provides a single management stack to manage all their workloads on any environment…

Getting started with PowerShell on Linux

First, lets remember a few things here,

  1. PowerShell is currently in an ALPHA version.  That means that there will be issues, but the community is working on it.
  2. This verion of PowerShell built in the PowerShell repo work on the following OS:

The version I will use for this post is Ubuntu 16.04

image

Step 1: Install the Dependencies

The PowerShell package is dependent on two other Debian packages:

  • libunwind8: library to determine the call-chain of a program - runtime
  • libicu55: International Components for Unicode

to install the dependencies, use the following command in a terminal windows:

 

 

 sudo apt-get install libunwind8 libicu5

 

 

image

 

Step 2: download the proper package from the release area

Considering this version only supports Ubuntu 14.04, Ubuntu 16.04, CentOS 7, and OS X 10.11. You need to download the appropriate package.

All packages are available on our GitHub releases page.

Selection_001

You can download them in a browser or use the following command :

 wget https://github.com/PowerShell/PowerShell/releases/download/v6.0.0-alpha.9/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb -P /home/pierre/Downloads/

image

 

Once downloaded in the /home/pierre/downloads/ directory, double click on the package in the file manager to install it using the Ubuntu Software app.

image image

Or run the following command from your terminal window.

 sudo dpkg -i /home/pierre/Downloads/powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb

Once this completes, PowerShell is installed on our Ubuntu workstation.  We can start Powershell by typing “powershell” in a terminal window.

Selection_004

More documentation can be found here:

  1. https://github.com/PowerShell/PowerShell/blob/master/docs/installation/linux.md
  2. https://github.com/PowerShell/PowerShell/tree/master/docs/learning-powershell

 

I hope this helps.  If you want to try some demos, some have been documented in the Github repo. https://github.com/PowerShell/PowerShell/tree/master/demos

Cheers! Signature

Pierre Roman
@pierreroman