After upgrading to the "Windows 10 Creators Update", on my dual booted Dell XPS 9360, I installed the Windows Subsystem for Linux, because my fingers like being able to use Unix/Linux commands :-)
There are a few steps to enabling and installing "Bash on Ubuntu on Windows", on a 64-bit Windows 10 Creators Update install:
Turn on the Windows Subsystem for Linux, by starting an Administrator PowerShell (right click on Windows icon at bottom left, choose "Windows PowerShell (Admin)" from the menu), then run:
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
It will run for a little while with a text progress message, then ask to reboot and do a small amount of installation before restarting.
Turn on Developer Mode to enable installing extra features: In Settings -> Update and Security -> For developers move the radio selection to Developer Mode (default seems to be "Sideload Apps"; settings can be found by left clicking on the Windows icon at the bottom left, then click on the "cog wheel"). It will install a "Developer Mode package" (which I guess includes, eg, additional certificates).
Start a
cmd
prompt (eg, Windows -> Run...cmd
), and inside that run "bash
" to trigger the install of the Linux environment. (Note that without doing the above two steps this will fail completely, with a "not found" message, so if you get a "not found" message double check you have done the steps above.) You are promoted to accept the terms at https://aka.ms/uowterms, which seems to just be a shortlink to the Ubuntu Licensing Page.The text also notes that this is a "beta feature" which is presumably why it is necessary to enable "Devleoper Mode"; the install itself seems to download from the Windows (application) Store. (They also warn against modifying Linux files from Windows applications which illustrates the complexity of making the two subsystems play nicely together. It seems like this behaves a little more like a "Linux container" running under Windows than parallel processes.)
It detected the locale needed for New Zealand (
en_NZ
) and offered to change it from the default (en_US
); I said "yes". (Note there was quite a long delay after this answer before the next prompt, enough I wondered if it had read the answer -- give it another minute or two.)Then it prompted for a Unix-style user name (see the WSL guide to Linux User Account and Permissions, at http://aka.ms/wslusers). It also prompts for a Unix-style password, which I assume is mostly used to run
sudo
.Install the outstanding Ubuntu Linux 16.04 updates (ie, the ones released since the install snapshot was made):
sudo apt-get update sudo apt-get dist-upgrade
After that, other than the default prompt/vim
colours being terrible
for a black background console (default on Windows), the environment works
in a pretty similar manner to a native Linux environment.
The "Bash on Ubuntu on Windows" menu option added, which runs bash
directly, suffers from the same "black background" readability issues.
But fortunately if you go to Properties (click on top left of title bar,
choose Properties) you can change the colours -- I simple changed the
background to be 192/192/192 (default foreground grey), and the foreground
to be 0/0/0 (default background black), and the default prompt/vim
etc
colours look more like they are intended.
There is some more documentation for Bash on Ubuntu on Windows which cover the whole Ubuntu on Windows feature. Of note, the Windows 10 Creators Update" version of the feature is based on Ubuntu Linux 16.04, which means I now have Ubuntu Linux 16.04 functionality on both sides of the dual boot environment :-) The newer version also seems to have improved Linux/Windows interoperabilty, and 24-bit colour support in the console.