I am a big fan of Linux and today want to share how you can install the Windows Subsystem for Linux (WSL) on Windows 10. This new feature available in Windows 10 lets you install a Linux bash shell and run various linux tools on Windows. Here I describe how to set up and install the Ubuntu Bash shell.
Installing the Windows Subsystem for Linux
The first thing that needs to be done is to enable the Windows Subsystem for Linux windows feature.
There are two ways of adding this feature. One way is to go into the “Turn windows features on or off” and enable “Windows subsystem for Linux (Beta)”.
The other way to add this feature is by opening an administrative powershell window and running the install command. To open an administrative powershell window you need to enter “powershell” in the search pane then right click it and select “Run as Administrator”.
Once the powershell window has been opened you can run the following command to configure the Windows Subsystem for Linux windows feature.
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
Once I installed this feature windows asked me to restart the computer. If windows prompts you to restart your computer you will want to do this now.
Installing the Windows Developer Tools
The final step in adding Linux tools to my windows machine is to enable the Developer tools. This can be enabled by searching “Developer features” in the search prompt.
Once the Developer features window has opened you need to select “Developer Mode” from the three options.
When this option is selected you are warned about potential security risks with enabling this. With the developer features you will be able to run unsigned applications. These applications can bring security risks but with an antivirus and by not installing applications you do not trust these are minimal. I then press yes to this pop-up and it began installing the developer mode packages.
When this had finished I moved onto the final step, setting up the Ubuntu Bash Linux System.+
Installing Ubuntu Bash Linux System
The final step now the Windows Subsystem for Linux and the developer tools package are installed is to set up bash. To install this you need to open a command prompt (search for cmd in the windows search box) and then type
Once I had entered the command and pressed enter it gave me a prompt asking if I wanted to install Ubuntu on Windows. After pressing
y it asks if you wish to use your current locale for Ubuntu. After pressing
y a second time it asked me for a UNIX username and password.
Once this has been entered you can use bash to access your Ubuntu install. At the moment GUI applications are not supported but by using bash you can access general UNIX tools.
Once I installed bash I updated it so that it is running the latest software by running
sudo apt-get update
sudo apt-get upgrade
Now I have access to general unix tools on windows, if you have any comments or questions feel free to ask in the comments.