You've probably heard the amazing news: PowerShell is now open source and available for Linux and Max OS X. In this post, I explain how you can install PowerShell on Ubuntu 16.04.

Note that PowerShell for Ubuntu is only available as Alpha version. Thus, not all features are implemented, and I suspect the package will contain a bug or two.

I installed PowerShell on a Ubuntu 16.04 VM on Azure, but the procedure should work on any installation. PowerShell is also available for Ubuntu 14.04, CentOS 7, Mac OS X, and Docker.

  1. The PowerShell package is dependent on two other Debian packages: libunwind8 and libicu55. You can install them with apt-get:
    sudo apt-get install libunwind8 libicu55
    Install libunwind8 and libicu55

    Install libunwind8 and libicu55

  2. PowerShell is not yet available through the Ubuntu repositories. Thus, you have to download the PowerShell package manually from GitHub. If you run Linux in the cloud without GUI and web browser, you can download PowerShell with this 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
    Download PowerShell for Ubuntu 16.04 from GitHub

    Download PowerShell for Ubuntu 16.04 from GitHub

  3. Now you are ready to install the PowerShell package:
    sudo dpkg -i powershell_6.0.0-alpha.9-1ubuntu1.16.04.1_amd64.deb
    Install the PowerShell package

    Install the PowerShell package

  4. To start PowerShell, simply enter "powershell" and you can then execute PowerShell commands. You'll notice that I switched to a black background because by default PowerShell commands are displayed in yellow, which is not easy to read on a white background. Of course, you can also change the colors in your console or SSH client.
    Start PowerShell on Ubuntu

    Start PowerShell on Ubuntu

As mentioned above, PowerShell for Ubuntu is Alpha software, and you probably don't want to work with this release in a production environment.

The first problem I ran into was that the cursor flickered wildly while I typed PowerShell commands. This was probably because I was working in a remote session via SSH. I was testing with vSSH on a Mac, but I had the same problem with PuTTY under Windows. I also installed PowerShell on Max OS X, and in a local session, I had no problem with the cursor. I suppose the problem also wouldn't exist if you run PowerShell on a local Linux console.

Many PowerShell fans will wonder how a shell and scripting language that was developed for Windows could be useful on Linux. Most of the interesting providers are unavailable on Linux, and the popular open source OS already has a plethora of powerful shells.

What's more, the power of PowerShell comes from its object orientation, which is very useful on a GUI-oriented OS as Windows but is of little help on a text-based OS like Linux. Linux shells have mighty text manipulation features, and I somehow doubt that PowerShell can compete here.

However, I really love Microsoft's move to open source PowerShell. It is quite likely that the community will quickly add the features that PowerShell needs to compete with other Linux shells. The main advantage of PowerShell compared to Linux shells and scripting languages is that it is much easier to read and learn. Thus, I can imagine that PowerShell will rapidly gain popularity in the Linux ecosystem.

For me, the main thing is that you will be able to easily manage Windows via PowerShell Remoting from other operating systems (in particular Mac OS X) without the need to launch a Windows VM.

If you want to learn more about what you can and cannot do with PowerShell on Linux, please read this excellent article in the PowerShell magazine. I also recommend watching this video intro by Jeffrey Snover, the godfather of PowerShell.

Subscribe to 4sysops newsletter!

In my next post, I will show you how you can install PowerShell on Mac OS X.

1 Comment
  1. jeo 5 years ago

    libicu55 is seemed to be released only for ubuntu16 and on

    http://packages.ubuntu.com/search?keywords=libicu55

     

Leave a reply

Please enclose code in pre tags

Your email address will not be published. Required fields are marked *

*

© 4sysops 2006 - 2022

CONTACT US

Please ask IT administration questions in the forums. Any other messages are welcome.

Sending

Log in with your credentials

or    

Forgot your details?

Create Account