How to Install Linux Bash Shell on Windows 11?

Installing the Linux bash shell on a Windows system can provide a convenient way to try out Linux commands and scripts without having to install a separate Linux operating system. By installing the Linux bash shell on Windows, you can avoid the hassle of switching between operating systems or maintaining multiple systems.

There are two different ways that you can implement to install Linux bash shell on windows 11, which are mentioned below:

Method 1: Install Linux Bash Shell on Windows 11 Using Command Prompt

The Command Prompt is a commonly used tool in Windows 11 that can be used to install the Linux Bash shell by using the following steps.

Step 1: Launch CMD

Launch the command prompt by searching it from the start menu in the following way:

To follow this process, it is important to run the command prompt with the “administrator” rights by following the image above.

Step 2: Install the Distribution

Type the below command, which will give you guidance as to how you can use the bash shell script on Windows 11:

$ bash

The first thing it tells you is that “Windows Subsystem for Linux” should be installed. After that, it also tells you the command needed to find the available Linux distributions for Linux by typing:

$ wsl.exe --list --online

The following distribution that you can see on the list can be installed, and you can install any of the mentioned distribution by typing the following command:

$ wsl.exe --install <Distro>

Whereas the word <Distro> should be replaced with the exact distro name that you want to install for example

$ wsl.exe --install Ubuntu-20.04

Install Distribution Through WSL

If you are going to install Ubuntu 22.04 LTS which is currently the latest version Ubuntu has to offer then you only need to type the following command:

$ wsl --install

This will first install a virtual machine platform which is a prerequisite to install any Linux distribution. After that, you can see in the below image that it starts downloading the windows subsystem for Linux that allows users to run and execute Linux OS on windows

After completing the first two steps; it will start downloading the Linux Operating system, which is Ubuntu 22.04 in our case.

When it finished installing then, it will ask you to provide the username and password so that it can start the Linux bash shell as shown below:

Method 2: Install Linux Bash Shell on Windows 11 Using Official Microsoft Store

Windows 11 comes with the official Microsoft store that has lots of different applications to install and one of them is the Linux distribution that you can do by following these steps:

Step 1: Launch Microsoft’s Store

You need to launch the Microsoft official store using the windows search bar or by clicking on the start button.

Step 2: Choose the Linux Distribution

After launching this application, you will enter the search bar of the Microsoft store, where you need to type the name of the available distribution, which is Ubuntu in our case.

Step 3: Install the Linux Distribution

This will provide you with different available versions of Ubuntu, so if you want to install the latest version then you need to select Ubuntu 22.04.1 LTS.

This will start downloading the distribution and will install it as well once it’s done after that you will be able to see the open button to launch the distribution.

Step 4: Configure Linux Distribution

When you open Ubuntu 22.04 then it will again ask you to input the username and password, but this will happen only for the first time.

Tip: Turn on the WSL Feature

In any case, if the Ubuntu distribution is not launching properly then you can solve this problem by enabling the “windows subsystem for Linux” option. You can enable it by clicking on the windows search bar and typing “turn windows feature on or off” and then opening it.

After that you need to scroll down and tick the box of windows subsystem for Linux to activate it as shown below:

Now when you launch the Linux bash shell, you can see its main interface just like a terminal and where you can run commands as shown below:

Conclusion

Installing the Linux Bash shell on Windows 11 allows users to access a native Unix-like command-line interface on their Windows operating system. Two different methods have been discussed for its installation which by using the command prompt and the second one is by using the Microsoft office official store.