Running Ubuntu Linux Binaries on Windows 10 Build 14316

Not April Fool’s Joke

As announced at Build 2016, Windows 10 will be able to run Ubuntu binaries via bash directly on Windows 10.  This isn’t a VM, or an emulator, or a container or Cygwin—these are ELF binaries running natively on Windows (if you remember the days of MS-DOS and how it also had a CP/M runtime, this is analogous).  This isn’t the full Linux kernel—Windows still handles hardware I/O, and this doesn’t include any of the Linux UIs.  Just a very rich set of binaries you can access via the bash* command line.

Making it Work

First, you need to be on build 14316.  Build 14316 was released to the fast ring on 4/6/2016, so depending on your sped of getting and applying Windows updates, it might be a while before you see it.  If you don’t know what build you’re running, you can check in All Settings >> System > About >> OS Build.

version

If you have the right build, you next need to enable “Developer mode”, which allows you to install applications and features which are less fully baked.  To do this, go All Settings >> Update & security >> For developers >> Developer mode.

enable_dev

Finally, you need to install the Windows Subsystem for Linux feature.  Do do this, go Control Panel >> Programs >> Turn Windows features on or off (under Programs and Features section).  Select “Windows Subsystem for Linux (Beta)”.

feature

You can now run bash by opening a command prompt and typing “bash” (you may have to reboot after adding the feature above).  The first time you do this, bash will be installed, but subsequent times bash will just start.  You’ll also have a new “Bash on Ubuntu on Windows” entry in All Programs you can pin to the Start menu and save you the command prompt.  Once you see the # prompt (meaning you have superuser privileges in bash) you’re ready to roll.

bash

Additional Resources

Scott Hanselman – Developers can run Bash Shell and user-mode Ubuntu Linux binaries on Windows 10

Dustin Kirkland – Ubuntu on Windows — The Ubuntu Userspace for Windows Developers and HOWTO: Ubuntu on Windows

Channel 9 – Linux Command Line on Windows

Russ Alexander and Rich Turner – Running Bash on Ubuntu on Windows!

If you’re new to the Linux command line, I highly recommend this book, I’ve learned a lot and it’s not painful to read:

* TIL: bash stands for “Bourne Again Shell”, named for its originator Steve Bourne.  I learned that from the above book!

Virtualized Ubuntu: Virtual PC or Parallels?

I’m a Windows guy.  That’s my job, that’s what the family runs, so that’s what I do.  But I’m fascinated by Linux, and I appreciate a lot of the rethinking the Linux crowd has done.  One of the more popular distributions of Linux is Ubuntu, and it’s supported by several virtualization programs.  Two that I have in my hands are Virtual PC and Parallels.  Since I’m pretty deep into Windows work, I’d rather virtualize Ubuntu, as opposed to a dual boot, and dedicating hardware is out of the question right now.

So, after installing and using Ubuntu 7.10 (Gutsy Gibbon) under both Virtual PC and Parallels, my winner is Parallels.  Here are a few reasons why:

Installation

Installation under Parallels was much smoother than Virtual PC.  In both cases, I simply reassigned the CD Drive to the ISO, changed the default HDD space and booted into the Live CD.  From there, I ran the installer program to install Ubuntu.  Parallels needed no additional configuration, but for Virtual PC, I had to enable a boot script to make the mouse work.  There were times where installation under Parallels had hung up, but waiting a minute or two and it picked back up again.

Operation

Operation under Parallels is also much smoother.

As with installation, I had to make some boot script changes in order for the mouse to work under Virtual PC.  Thankfully someone had gone through this already and blogged about it, because I’m not at the level where I can figure these things out yet.  Also, there seems to be a somewhat random local echo when I press a key under Virtual PC.  When I hit a key, it may show up as if I pressed it 2 or 3 times.  This doesn’t happen under Parallels.

The mouse issue seems to be more a fault of Linux than Virtual PC, since the mouse was being reported as a PS/2 mouse.  My mouse is really a USB mouse, which is picked up differently by Parallels and Ubuntu.  But the echo thing is driving me crazy.

Finally, performance.  Performance of Ubuntu under Parallels is much snappier than Virtual PC.  I can’t load up all the snazzy desktop effects under either, but that’s OK, all I want to do is learn more about Linux.

One major difference, and this may be a deal breaker for many, is that Virtual PC 2007 is free, while Parallels isn’t.  I have Parallels because Lunarpages hooked their webmasters up with a free copy.

Overall, I’m looking forward to working with Linux more now that I have an environment which makes it easy to work with.