Activate Bash on Windows 10

bash to windowsIn Windows 10 with the Anniversary Update (august 2016) Microsoft introduced BASH shell on Windows.
This is done in collaboration with Canonical. It’s not VM or a porting of the originale *nix code: MS and Canonical introduced a component in windows used to translate unix binaries system calls to windows system calls (Windows Subsystem for Linux). This let us use the original *nix binaries inside a windows environment with no recompilation or rewrite of any kind.

This is a component of Windows you can activate simply from “Control Panel” -> “Add/Remove Program” -> “Activate Windows Feature”. From there flag the component “Windows Subsystem for Linux (Beta)

After installation run simply “bash” instead of “cmd” 🙂

note: at the first run an image of linux will be downloaded and installed. It’s an ubuntu longtime support edition running in user mode. From there you can download other packages using “apt install” if you need other tools not included in the native ubuntu LTS edition.

Every windows fs will be available from /mnt so we’ll find c:\ under /mnt/c and d:\ under /mnt/d .

Now you can start using your native linux bash scripts on windows too. Enjoy! 🙂