While everyone was busy deleting Microsoft, the Redmon giant went ahead and bought the popular code management platform GitHub. Along similar lines, Microsoft Joined the Linux Foundation as a partner to bring support for the Linux kernel in Windows 10. All these decisions show that Microsoft is serious about bringing software development and research to Windows 10. So if you are a student or programmer, I will show you how you can enable Linux. Bash Shell on Windows 10 and take advantage of this great feature. Not only that, but I will also share the steps for upgrading from Windows Subsystem for Linux (WSL 1) to the latest WSL 2 with many new improvements. Having said all that, let’s go ahead and learn about the installation process.
Enable Linux Bash Shell on Windows 10
Here are the steps to enable Linux Bash Shell in Windows 10: quite simple and understandable. All you have to do is enable certain features in Windows 10 and download the Linux distribution you want from the Microsoft Store. This much. So, without wasting any time, let’s examine the steps in detail.
1. First we need to enable the “Windows Subsystem for Linux” feature. To do this, press the Windows key once and type “windows properties”. Later on, Click on “Turn Windows features on or off”.
2. Then scroll down and Enable “Windows Subsystem for Linux”. Now restart your computer to reflect the changes.
3. After rebooting, Open Microsoft Store and search for “Linux”. You will find many Linux distributions, including Ubuntu and Kali Linux. For this article, I chose Ubuntu as it is more popular with general users. Now, click the “Install” button.
4. After the installation is complete, restart your computer for the changes to take effect. Now, simply Search for “Ubuntu” in the Start Menu and open it.
5. The “installing…” message will be displayed for a few seconds. and after that, You can set your UNIX username and password. Voila, Linux Terminal is ready to use!
6. Here Linux Bash Shell at work on Windows 10. I can use most of the Linux commands and it works flawlessly. You can even upgrade to the latest Linux version by running sudo apt upgrade
to command.
Upgrade Windows Subsystem for Linux (WSL 1) to WSL 2
If your computer is enrolled in the Windows Insider program and Updated to version 18917 or higher then you can upgrade to the latest WSL 2. It comes with significant performance improvement, which I talk about in detail in the next section. So let’s go ahead and learn how to upgrade from WSL 1 to WSL 2.
1. Before we switch to WSL 2, we need to enable another Windows Feature. Search for “windows features” again and open it, similar to what we did in the first step of the section above. Now scroll down and Enable the “Virtual Machine Platform” feature. Finally, restart your computer.
2. Next, open PowerShell with administrator privilege and execute the following command. make sure you change <Distro>
with installed distribution name like Ubuntu
, Debian
or Kali Linux
. Now your PC will start converting WSL 1 to WSL 2. Hard to take 5-10 minutes.
wsl --set-version <Distro> 2
3. Now, Enter the following command in PowerShell To check the current version of the Windows Subsystem for Linux. It should now show version 2. Great, you’ve successfully migrated to WSL 2!
wsl -l -v
How is WSL 2 better than WSL 1?
With the release of WSL 2, you’ve been able to do a lot more in Windows 10 ever since. comes with a real Linux kernel. It takes almost 20x less time than WSL 1 to fetch I/O commands and compile programs with major improvements. this WSL 1 shipped with a Linux kernel compatibility layer this took significantly more time to decompile commands and answer system calls. Also, WSL 1 had limited command support and has now been replaced by full support with WSL 2. Basically, the side-by-side of Windows and full Linux support is a boon for serious programmers and students alike.
Here is an example of how fast and efficient WSL 2 is compared to WSL 1. WSL 2 took 4.09 seconds to render Google’s homepage, compared to WSL 1’s 11.64 seconds.. You save 3 times less time, which is essential in programming and software development.
Since WSL 2 is now full of real Kernels and Linux apps, You can also run the Ubuntu GUI. However, it is not natively supported and we will have to wait for Microsoft to implement this great feature. As of now, there are several third-party ways to run the GUI using Hyper-V virtualization in Windows 10, but the process is too complex for the average user to enter. So when WSL 2 is released with native GUI support and we will definitely let you know the exact steps.
Here is a short timeline WSL 2 release date.
- Windows Insider – June 2019 [Already live, Build 18917 or above]
- General Release — Q1 2020
Use Linux Bash Shell with WSL 2 Support in Windows Terminal
Now, after the Windows Insider September release, You can use Bash Shell side by side with PowerShell and Command Prompt in Windows Terminal. And the big part is that it supports the latest WSL 2. There is no need to convert the distribution every time. You can simply open the Windows Terminal and click the “down arrow” button and select “Ubuntu”. This much. Enjoy!
Make Windows 10 Your Next Workstation with Full Linux Support
So that was our detailed review of the Windows Subsystem for Linux and how you can enable the Linux Bash Shell with WSL 2 support in Windows 10. It’s surprising that Microsoft has shown its commitment to bring full-fledged Linux support to Windows 10. Obviously, Microsoft is trying to make Windows 10 a universal platform for everyone, including average users, developers, and of course students. Anyway, that’s it for us. If you found the article informative and would like to see similar posts about the new Windows-Linux ecosystem, stay tuned. We will provide more detailed guides and tutorials in the future.