PowerShell is now open sourced and available on OS X 10.11 and Linux!

Yesterday, Microsoft and Jeffrey Snover announced PowerShell is now open sourced and available on Linux and OS X and is available for download here. The blog post goes into great detail the journey to where we are now with PowerShell being available on platforms other than Windows, and there’s even a Channel 9 video demoing it here. While I strongly encourage you to check out Snover’s announcement and video, I also wanted to note a few things:

1. You’re probably wondering how it works. Well, it’s powered by .NET Core, but does not require you to have .NET Core installed. The package you download will install the parts of .NET Core you need.

2. If you’re a current Bash user who is now interested on diving into PowerShell and want to know where to start, I recommend checking out the Map Book for Experienced Bash Users, which is about 70% of the way down on this page.

3. If you want to get started with setting it up on Ubuntu 14.04, 16.04, and OS X 10.11, instructions are on the GitHub link, but also below:

On Ubuntu 14.04, Ubuntu 16.04, and OS X 10.11 (From a terminal session)

cd to your home directory by typing:

Download the PowerShell package by typing:

For just Ubuntu 14.04

Install the dependencies:

For just Ubuntu 16.04

Install the dependencies:

For just OS X 10.11

Install the package:

Then run powershell by typing the word: powershell

Visual Studio Code Modifications

If you want to edit your Integrated Terminal settings in VS Code on OS X or Ubuntu to use new Powershell, I have included the instructions below:

From within Visual Studio Code, click File -> Preferences -> User Settings. This will open a settings.json file

OS X – Add this line:

(Note: this was tested on OS X 10.11.6)

Ubuntu – Add this line:

(Note: This was tested on 14.04)

Final Tips

Create an alias to use ‘ps’ instead of powershell

cd to home directory:

Create or edit ./bash_profile using your favorite text editor. I used vim.

Add the following line:

Type the following to refresh the bash shell environment:

And there you go! Test it out, let me know what you think!

Reminder: All of my posts are provided "AS IS", imply no warranties, and confer no rights or special privileges. Use of included postings, code samples and other works are subject to the terms specified at Microsoft. For more information, click here.

Comments 3

  • Great article Jessica. Just be carefull as ps is the default process exploring utility for *nix based OS’s.

  • How do I get nuget installed on MacOS, so that I can install packages for powershell?

    • You have you install .NET Core on Mac first. Which version of PowerShell Core are you using? Note: I haven’t tried to install the latest version alpha 6.12 from scratch so it is possible the necessary .NET Core dependencies are included in the latest release. I hope to get a chance to test that out this week.

Leave a Reply

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