Using Bash in Windows
1. Update Windows
In order to install Bash on Windows, you need to be running the 64 Bit version of Windows 10 and have installed the Windows 10 Anniversary Update. If you're unsure if you have this, click the search button at the bottom left of your screen and type winver.
This will display a pop up showing which version of Windows you're running. Check that the "Build" number is at least '1607'. If it isn't, then click the search bar again and search for 'Updates'. Click the option marked 'Check for Updates'.
2. Enable Developer Mode
The Bash feature in Windows is experimental, so in order to use it, you must enable Developer Mode. Click on the search bar at the bottom left of the screen and type For Developers, then click the option labelled 'For Developers Settings'.
Click the button next to 'Developer mode'. Read the security warning then click 'Yes' to continue.
The window will show that it's 'Searching for Developer Mode package', then 'Installing Developer Mode Package'.
Finally you'll see a warning message saying that some features might not work until you restart your PC. Restart the machine to make sure it's fully installed.
3. Enable Windows Subsystem for Linux
Once your machine has restarted, click the search bar at the bottom left once again and type the word ‘Programs’. Click on the option marked ‘Programs and Features’.
A new window will open. Click the link on the left hand side marked ‘Turn Windows Features on or off’. A pop up will appear with a series of features. You need to click the check box next to ‘Windows Subsystem for Linux (Beta)’, then click 'OK'.
The feature won't activate fully until you restart your machine. Close and backup any important files then click ‘Restart Now’.
4. Download Ubuntu
Windows will take some time to restart as it applies your new features so give it a few minutes to do this. Once you are back on the desktop, click the search bar at the bottom left and type the word ‘Bash’. Click the option marked ‘Bash – Run Command’.
The Bash window will open announcing it wants to install Ubuntu on Windows. Rest assured this only applies to this window and your other files and programs won't be affected. Type ‘y’ to confirm.
The necessary files will be downloaded from the Windows Store, then extracted automatically.
5. Set up your user account
Bash will now ask you to choose a username and password. Remember this username and password has no bearing on those you use to log in to Windows and you can choose any combination you like.
Enter the username entirely in lower case e.g ‘john’ not ‘John’. When the system prompts you for the password, you may notice nothing appears as you type. This is a security feature of UNIX to prevent people peering over your shoulder to see your information!
Enter the password slowly then press return. Bash will ask you to repeat the password once more to complete setup.
6. How to install your first Linux program in Windows with Bash
For your first time with Bash, we're going to install a small, text based program named 'Cowsay'. Type the command:
7. Enter the Matrix
Now that you have mastered having a digital cow echo your words back to you, make sure you are comfortable with the process of installing new programs and learn how to stop them.
Run the command
8. Install Python and Pip
As handy as Bash is for command line apps, its primary purposes is to help Developers, which is why you need to enable Developer Features in Windows in order to use it.
One of the most popular programming languages is Python as it's very simple to set up and use. This should come pre-installed when you downloaded Ubuntu with Bash but run
9. Download and run a Python Game
As you're working in a Terminal, you can't load websites easily but you can retrieve files with the command wget.
10. Further reading
The commands we have explored so far barely scratch the surface of Bash's potential as it can do virtually anything Linux can once you have mastered the basics.
For a introduction to some Linux Conventions and basic system commands, check out our handy guide.
The Microsoft Website also has a handy guide to Bash and its companion app lxrun which can be used to uninstall and reinstall the Ubuntu image.
If you want to wipe your Ubuntu installation and start again, click the search bar in Windows and type 'cmd'.
Click ‘Windows Command Prompt’. Next run the command