Windows 10 allows you to run a Linux bash shell through the Windows Subsystem for Linux (WSL) software. If you’d like to run Linux scripts and programs from within Windows, this may be a perfect option for you.
What is Windows Subsystem for Linux?
Microsoft has worked with Linux companies and devised a way to bring various distributions of Linux straight to Windows. It’s not quite the same as hosting your own instance of Linux in a virtual machine; however, it proves very convenient when all you need to do is run an occasional script or program.
WSL isn’t exactly the Linux you’re used to. It doesn’t actually have its own kernel (at least not yet), so there are some limitations. You can’t expect to use hard drive encryption with WSL, for example. But with that said, it’s impressive what you can do with WSL and we’ve found it to be very useful.
Before installing WSL
Before you can use WSL at all, you have to enable the component through the Windows Features window. You can open it by typing ‘windows features’ in the Start menu.
In the Windows Features menu, scroll down to find ‘Windows Subsystem for Linux’ and put a check mark in the box next to it, then click OK.
A prompt will appear, saying that Windows needs to restart in order to complete the changes. Click ‘restart now’ and rejoin us afterwards to start installing WSL.
How to install WSL
After your PC reboots, you can install WSL straight from the Microsoft Store. Open the store from the Start menu to begin.
In the Microsoft Store, click on search and type ‘linux.’ On the results page, click on ‘Get the apps’ to bring up the different Linux distributions available for download.
If you’re not sure which one to download, Ubuntu is always a safe bet. It’s the most used Linux distribution and has an excellent track record, but there are a few others available for download if you’d prefer them.
Click on the one you’d like and then hit ‘Get’ to start the download.
Once the download completes, you can access your Linux install from the start menu:
It may take a few minutes to add the finishing touches this first time around, but in the future you’ll have instant access to the terminal.
Once it’s done, the first thing it will ask you to do is create a default user and a password. It’s totally separate from your Windows login and doesn’t need to match.
And that’s it! You now have access to a Linux terminal right from Windows. We’ve also written an article on how to mount and access your hard drives in WSL in case you are wondering how to access some files you already have on your system.