Let's bash Windows 10. I mean BASH on Windows 10!

Updated: September 23, 2016

Yes. Windows 10 is nothing special. We have established that, both when the operating system was released, in my review on G50 a year ago, and more recently in my article on the Anniversary Update. Neither good not bad. Just average.

However, what makes is rather interesting is that you can run BASH. Yes, proper Linux, essentially. Not as a virtual machine. It's a user-mode implementation of Ubuntu, through the use of Pico kernel drivers that translate Linux syscalls into NT APIs and emulate the Linux kernel. Wicked. Clever. It's called Windows Subsystem for Linux (WSL), and it is as native as it gets. Quite compelling for us nerds. Let us explore.


WSL setup

I am going to skip the architectural overview. More links below. I will focus on the implementation and the use. Basically, most people will get to use WSL through a shell prompt. Once installed, it will feature as a separate application in the system menu. Once launched, it will behave like any Linux console. In fact, think of it as virtual terminal for all practical purposes.

Anyhow, under this BASH, there's an Ubuntu image. It's our trustworthy Trusty, and you can do pretty much everything, except kernel stuff. You will not have direct access to hardware, and you won't be able to install drivers. The graphical interface is another interesting one, but more about that soon. Let's set things up, shall we.

To install WSL, first, you will need to enable the Developer mode in the Windows settings, under Update & Security > For Developers. Then, you will need to add a new Windows component. Turn Windows features on or off, then add Windows Subsystem for Linux (Beta). Install the component and reboot.

WSL, add

After reboot, launch BASH from the system menu, like any other program. Another short setup will run. You will be asked to setup a user and a password. It can match your Windows one, or not.

Bash installing

Setup complete

Now what?

Time to start having fun. The default shell is quite nude, only a little bit of basic stuff. But if you know your way around Ubuntu, you can start installing things. Simply run the apt-get package manager to grab software you need. If you struggle with this step, then I would recommend you read my Linux commands & configurations guide, and after that, my Ultimate guide to Linux for Windows users.


The best match is not what you need - you want the last offered option.

Bash running

Home dir

Uname command

I installed build essential tools, so I could compile if needed, but also setup several other programs and utilities. The performance is decent but not perfect. There is an obvious penalty for doing this, both pure computation and the disk IO. Slower, but then, most people probably do not feel comfortable dual-booting, and this give an easy access and exposure to Linux.

Install software with apt-get

Installing new software

Installing new packages

Graphical interface?

Ah? What about graphical applications then? Well, by default, it will not work. But this is why we are going to have a sequel, which will show you how to run programs like Firefox, VLC and others this way. It won't be perfect, but it will be doable. Stay tuned.

[] dbus interface error: Failed to connect to the D-Bus session      daemon: Unable to autolaunch a dbus-daemon without a $DISPLAY      for X11
[] main interface error: no suitable interface module
[] main libvlc error: interface "dbus,none" initialization failed
[] main libvlc: Running vlc with the default interface. Use 'cvlc'    to use vlc without interface.

More reading

If you're interested in the technical details - recommended, really.

Frequently Asked Questions on WSL

Underlying technology present in WSL


Before you say Microsoft has an agenda, think for a second. Yes, this is a nerdy feature, but it is available in millions of Windows boxes now, something that previously did not exist. You can also argue that activating the developer mode and installing new Windows features is equally complex as installing a distro, yes you are right. Still, this extra stuff definitely makes things more interesting than ever before.

I find the addition of Ubuntu slash BASH to Windows 10 to be a very cool and practical exercise. It will be quite intriguing to see how this evolves. All in all, for a beta, the software works well. Speed can be better, and there are obvious caveats around graphical applications, but we will address those in a follow-up tutorial. For the time being, if you do have a copy of Windows 10 lying about, maybe this exercise will get you somewhat remotely engaged with the operating system. Have fun, my dear explorers.


You may also like: