ConsoleZ and Linux Ubuntu on Windows in real life

Over the last year or two, I’ve been really fond of working with ConsoleZ for all my development work in Windows. It’s the thing I open before Visual Studio these days and with Posh-Git, I have a great deal of control over what I’m doing. It’s quite pretty too.

I used a great guide from Phil Haack (here), which I make all my new developers read when they start so that they use Git from the command line and can do stuff that they couldn’t do normally with a windows cmd console.

With the announcement of the Ubuntu for Windows Beta, I’ve been hoping to get a new console up when I load ConsoleZ, but I’m hitting a few snags. I’ll cover them in another post, but for now, here’s how to get your Bash shell installed the proper way.

So first of all, you need to install the Windows Anniversary Update, which is available from Windows Update, and takes a wee while to get installed.

Then in Settings, find the For Developers section and turn on Developer Mode (you’re a developer anyway so you’ll have that on won’t you?):

So — that’s all good. Next step is to go to Turn Windows Features On or Off and add the Windows Subsystem for Linux (Beta) on.

Now you’ll need to reboot to install that.

The next step is something I couldn’t get to work on two machines out of the box, so I had to do something else.

Once your machine is back, open a Windows Powershell Console as Administrator:

Bizarrely enough, you need to turn off legacy console mode, so right click the top window bar and hit Properties:

Turn off the Use legacy console checkbox and hit Ok.

In the powershell window, type

lxrun /install /y

This runs the proper installation of the Bash on Ubuntu on Windows, so that when you search your start menu for Bash, you see this:

Well done! You can now run vi, and a couple of hours later work out that :q! will get you out of it.

Oh, and use this: cd /mnt/c. You’ll thank me for that!

I suspect that these difficulties are making the uptake of this lower than it should be, but hopefully this will help someone out.

In my next post, I’ll explain how to get ConsoleZ set up with this, how to get past the Up key conundrum and see if it’s possible to completely migrate to bash for general day to day tasks in Windows.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.