How to Install and Use Linux Bash Shell on Windows 11

Linux is a customizable, steady, and safe open-source working system. It helps bash, which is a default command-line interface for a lot of the GNU/Linux techniques. The total bash kind is “Bourne Once more Shell”, because it was developed to switch Bourne Shell with extra options. The benefit of utilizing a bash shell is it executes human-readable instructions, executes packages, and handles file techniques.

When utilizing Home windows, bash is a robust software to entry Linux/UNIX instructions and operations on Home windows techniques. You don’t have to put in a digital setup to run twin working techniques. Set up WSL on Home windows 11 and carry out Linux instructions and shell scripts inside it.

Easy methods to Set up & Use Linux Bash Shell on Home windows 11

To entry the bash shell on Home windows 11, set up WSL on the system. The method is sort of easy & fascinating, so there’s no want to fret.

Launch Home windows Terminal by right-clicking on the Home windows icon and deciding on Terminal (Admin). It will run the terminal utility as administrator:

After getting the terminal on display, kind within the following command to execute it and hit Enter:

The system will start downloading and putting in the related property; this course of might take a number of minutes.

After the wsl set up, the set up course of will proceed to start out downloading Ubuntu routinely and ask you to restart the system as soon as it’s completed:

Subsequent, the terminal will ask you to set credentials for the Linux default distro, Ubuntu. Be sure that you don’t set the identical Home windows login Credentials; this ought to be completely different:

As soon as the method is accomplished, Ubuntu might be launched.

You’re not restricted to Ubuntu distribution solely. Different distributions can be put in on Home windows 11; simply what distributions can be found.

To see the checklist of accessible distributions, run the next command in Home windows Terminal:

You’ll be able to simply set up some other Linux distro on Home windows Terminal by referring to the checklist out there and utilizing the command given under:

wsl –install -d <distro_name>

Exchange the destro_name with the title of the Linux distribution that you simply need to set up:

wsl –install -d OracleLinux_9_1

The method is identical as we did within the Ubuntu set up; it’s good to add credentials that differ from Home windows login credentials.

Easy methods to Launch Linux Distribution on Home windows 11

You’ve gotten two choices to launch the downloaded Linux distribution:

Open the Home windows Terminal via the Begin menu and kind the ubuntu command:

Alternatively, you possibly can straight search it from the Home windows Search bar by typing Ubuntu in it; choose the Ubuntu app to launch it:

Easy methods to Run Bash Shell on Home windows 11

Let’s run bash instructions to verify the way it works to launch Linux Bash Shell on Home windows 11.

To show the checklist of all Linux instructions that can be utilized in Bash Shell, execute the next command within the terminal:

Run the assistance command with the parameter in Linux Bash Shell to get the person command particulars:

Easy methods to Create a Bash Script File in Home windows 11

To create a bash file, the next course of ought to be adopted:

Step 1: Open a textual content editor like Nano or some other software to create a file:

Step 2: Begin writing the script:

#! /bin/sh

echo “Hiya World”

Save the file with the .sh extension by urgent the Management +X key and setting the file’s title like

Step 3: Open the Linux terminal and kind the ls command to verify if the file has been efficiently created:

Easy methods to Run Bash Script file in Home windows 11

To run bash scripting, launch the command immediate on the display and allow Linux distro by typing ubuntu in it.

Sort the file title within the terminal and hit the Enter button:


Linux Bash Shell is the default command-line software and a alternative for Bourne Shell. It’s a highly effective software to run Unix operations on Home windows with out putting in a digital setup. Bash shell helps user-friendly instructions; not solely this, however you can even execute Unix duties and manipulate recordsdata inside it. To get it on Home windows 11, we should set up WSL first on Home windows 11, and it’ll routinely obtain Ubuntu because the default distro of Linux. This text talked about an in depth guideline for putting in WSL on Home windows 11 and how you can launch it. Furthermore, we now have discovered how you can run a bash script file on Home windows 11.

Info: This submit is rewritten with inspiration from the unique URL. Please click on on the supply hyperlink to learn the unique submit

Supply Hyperlink :

Related Articles

Back to top button