Linux (Ubuntu) in Windows

Well, it's true. In a sign of pure desperation, Microsoft has embedded Ubuntu Linux within Windows 10. As someone who jumped ship from Windows and .NET a few years ago, and has been building apps for the MEAN Stack ever since (Mongoose, Express, Angular, and Node), I am finding this rather handy. Granted, I've been on OS X for decades but, since my wife's machines are all Windows, this allows me to go back and forth while having a somewhat native experience.

The install is quite easy. Assuming you have the Aniversary Update for Windows 10, head into Control Panel and turn on "Developer Mode":

You'll probably have to reboot. Once your machine is back up, add the Windows Subsystem for Linux (Control Panel > Programs > Turn Windows Features on or off):

Aaaand, finally, once it's installed execute the magic command lxrun /install /y from an elevated Command Prompt:

Once it completes, you'll have a new item on the Start Menu called "Bash on Ubuntu on Windows":

I like to take it a step further by adding my dotfiles from GitHub. This will take care of installing all of the dev tools I'm using (Git, Node, NPM, Bower, Node-Inspector, etc.):

If you'd like to play with my dotfiles, you can install them by running the following from within Bash:

bash -c "$(wget -qO - https://raw.github.com/FredLackey/dotfiles/master/src/os/setup.sh)"  

The entire file system for Ubuntu lives in your AppData folder under ...\Local\lxss:

The main folders to know about are:

\mnt      <- pointers to your drives (C:\, D:\, etc.)
\root     <- the root user's home directory
\rootfs   <- the root file system

Here's a closer look at the \mnt directory:

If you followed the directions above, you're logged in as root by default (remember, the user directories are contained in the %LocalAppData% folder). This means your entire home directory is in there:

And, of course, if you completely hose your Ubuntu install, or just don't want the data taking up any more space, you can blow it away, along with any data, by issuing the reverse command from the install from an elevated Command Prompt... lxrun /uninstall /full:

Overall, not too bad.


Quick side note...

If you really want to get your Ubuntu on, you can also add the official Ubuntu Font Family. Download them from the link, extract 'em, right-click and install 'em, and then get to tweaking.

Add the following string value to your registry:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Console\TrueTypeFont]
"000"="Ubuntu Mono"

... as such ...

And, finally, set the font to Ubuntu Mono in the properties of the Ubuntu window: