Beginning in August 2016, the public version of Bash on Windows (which works thanks to the underlying Windows Subsystem for Linux) has been available (via a partnership with Canonical, creators of Ubuntu). Installation is easy, but set-up can offer a few hick-ups versus what native or ssh users are used to. Instructions below:
Before starting, make sure that your “Build” number for Windows is at least “1607”. You can check this by running winver from Start. If your version of Windows isn’t current enough, search “Updates” from Start and ‘Check for Updates.”
- From Start, search “Use developer features.” Alternatively, navigate Open Settings > Update and Security > For developers.
- Select the “Developer mode” radio button
- From Start, search “Turn Windows features on or off,” then select the checkbox next to “Windows Subsystem for Linux (beta)” and click “OK”
- Restart your computer.
- From Start, search “Bash” and run as administrator. Type y to confirm. Enter your new username (all lower-case) and type a password. Note: no characters will appear while typing the password (a security feature familiar to previous bash users).
- Note: If you use Windows 10 privacy software (such as W10Privacy, which I recommend), you will need to temporarily re-enable telemetry for this step (since the download is via the Windows Store). If you don’t remember to re-enable telematics first, you will see a quick error screen flash for 1/4 of a second saying “Unable to download from the Windows Store. Please check your network connection.” and Bash will close (see screenshot below). After the initial install, however, you can re-enable telematics.
Now that Bash on Windows is installed, we’re able to install Linux programs as desired, however, many packages and a GUI (X server) are missing. Basic developer tools, however, like Python are bundled by default (though pip and pip3 are not).
The easiest way to add a GUI:
- Install Xming (https://sourceforge.net/projects/xming/). Note: there are many other options for this, Xming is fine/easy.
- Set your display environment variable by typing the following into Bash: export DISPLAY=:0
- Now you can run programs that require a GUI (such as text editors, etc).