Bash Shell is simply a command-line utility that has been a part of Linux for a very long time and now, Microsoft has directly added it into Windows 10. This is neither a virtual machine nor any container or any software compiled for Windows. Instead, it is a full Windows Subsystem intended for running the Linux software, based on Microsoft’s discontinued Project Astoria for running Android apps on Windows.
Now, we all know what a dual-mode operating system is. What will you do if you want to use the Windows operating system and the Linux operating system but your PC is not strong enough to handle the dual-mode operating systems? Does it mean you have to keep two PCs, one with the Windows operating system and another with the Linux operating system? Obviously, not.
Microsoft has made it possible to use a dual operating system mode without actually having two operating systems in your PC. Microsoft in partnership with Canonical, which is the parent company of Ubuntu, announced that now, you can run Linux on Windows using a Bash shell i.e. you will be able to perform all the functions of Linux on Windows without having a Linux operating system in your PC.
And, with the up-gradation of Windows 10, it has become very easy to get a Bash shell on Windows. Now, this question arises, how to install the Linux Bash shell on Windows 10? In this article, you will get an answer to this.
Table of Contents
How to install the Linux Bash shell on Windows 10
In order to use the Linux Bash shell on Windows 10, first of all, you have to install the Linux Bash shell on your Windows 10, and before installing the Bash shell, there are some prerequisites.
- You must be running the Windows 10 anniversary update on your machine.
- You must be using the 64-bit version of Windows 10 as the Linux Bash shell does not work on the 32-bit version.
Once all the prerequisites are fulfilled, start installing the Linux Bash shell on your Windows 10.
To install the Linux Bash shell on Windows 10, follow these steps:
1. Open the Settings.
2. Click on the Update & Security option.
3. Click on the Developer options from the menu at the left panel.
4. Under the developer features, click on the Radio button next to Developer mode.
Note: Starting with the Fall Creators Update, you don’t need to enable Developer mode. Directly skip to step 9.
5. A warning dialogue box will appear asking if you are sure you want to turn on the developer mode. Click on the Yes button.
6. It will start installing the Developer Mode package.
7. After the installation is finished, you will get a message regarding the developer mode being turned on.
8. Restart your PC.
9. Once your PC is restarted, open the Control Panel.
10. Click on Programs.
11. Under the Programs and Features, click on Turn Windows features on or off.
12. The below dialogue box will appear.
13. Check the checkbox next to Windows Subsystem for the Linux option.
14. Click on the OK button.
15. Changes will start applying. Once the request is completed and the components are installed, you need to restart your PC by clicking on the Restart Now option.
16. Once the system restarts, you need to install the Ubuntu distribution for Windows Subsystem for Linux.
17. Open Command Prompt (admin) and type the following command and hit Enter:
Note: Starting with the Fall Creators Update, you can no longer install or use Ubuntu by using the “bash” command.
18. This will successfully install the Ubuntu distribution. Now you just need to set up the Unix username and password (which can be different than your Windows login credential).
19. Once finished, you can use the Bash command on Windows by opening the command prompt and using the following command:
Alternative: Install Linux distros using Microsoft Store
1. Open Microsoft Store.
2. Now you have the option to install the following Linux distribution:
Suse Linux Enterprise
3. Search for any of the above distros of Linux and click on the Install button.
4. In this example, we will install Ubuntu. Search for ubuntu then click on the Get (or Install) button.
5. Once the installation is complete, click on the Launch button.
6. You need to create a username & password for this Linux distribution (which can different than your Windows username & password).
7. Now create a new username & password then repeat the password and again press Enter to confirm.
8. That’s it, now you can use the Ubuntu distro whenever you want by launching it from the Start Menu.
9. Alternatively, you can launch the installed Linux distro by using the wsl command.
As you know, the Linux Bash shell on Windows is not the real Bash shell you find on Linux, so the command line utility has some limitations. These limitations are:
- Windows Subsystem for Linux (WSL) is not designed to run the Linux Graphical applications.
- It will only offer developers a text-based command-line feature to run Bash.
- Linux applications access the system files and everything that is available on the hard drive so you cannot launch or use the scripts on Windows programs.
- It also does not support background server software.
- Not every command-line application works..
Microsoft is releasing this feature with a beta label on it, which means that it is still in progress, and not every intended feature is included and sometimes it may not work properly.
But, with the coming times and updates, Microsoft is finding ways to make Linux Bash shell as same as the real Linux Bash shell by focusing on its core functionalities like Bash environment to run tools like awk, sed, and grep, Linux user support, and many more.