How to add BASH to Windows Terminal

Photo of author

By Victor Ashiedu

Published

Do you want to add BASH to your Windows Terminal? There are two ways to achieve that and this guide shows both.

Method 1: Configure with Git BASH

As I mentioned in my intro, one of the methods to get BASH on Windows Terminal is via Git.

The first step is installing Git for Windows, so, we will kick off this section with the steps to accomplish this.

Step 1: Install Git for Windows

  1. Open the https://git-scm.com/downloads link. Then, on the Downloads section, click the Windows link.
Method 1: Configure BASH on Windows Terminal with Git BASH
  1. On the next page, click the highlighted link to download the latest version of the app.
  1. Once the exe is downloaded, double-click it and follow the Wizard to install Git for Windows.

Step 2: Add Git BASH to Windows Terminal

With Git installed on your Windows PC, you can add the Git BASH command-line tool to Windows Terminal with these steps.

  1. Search “terminal” and open the app
Step 2: Add Git BASH to Windows Terminal

Once Windows Terminal opens, follow the steps in How to Add New Profiles to configure Git BASH on the Termina.

After adding Git BASh to the Terminal, it will become available to open.

Finally, you can execute BASH commands like “ls -l”, chmod, etc

Method 2: Set up with Windows Subsystem for Linux (WSL)

Another method of setting up BASH on Windows Terminal is to install the WSL which automatically installs the Ubuntu Linux distro.

When you install Windows Subsystem for Linux, Windows adds the Ubuntu distro to the Terminal automatically. However, you can also manually create a profile for the distro

Let’s see these steps in action!

Step 1: Install Windows Subsystem for Linux

Installing the Windows Subsystem for Linux (WSL) optional feature is straightforward. All you need do is open CMD as administrator and run the command below.

wsl --install

At some point, Windows will restart. When you log back in, you will receive a prompt to complete the Ubuntu installation – select a username and password.

Step 2: Open Ubuntu on Windows Terminal

After installing WSL and completing the Ubuntu Distro configuration, you can open the Distro on Windows Terminal – the default name of the profile is “Ubuntu”.

Method 2: Set up BASH to Windows Terminal with Windows Subsystem for Linux (WSL)

This makes BASH available on the Terminal and you can run standard Linux commands.

However, you can add a profile for the distro manually by following these steps:

  1. Get the name of the Ubuntu Distro by running the “wsl –list” command in CMD.
wsl --list

This command listed multiple Linux Distros available on my WSL. But, I will be adding a profile for the highlighted profile.

  1. To add the Ubuntu (BASH) profile to the Windows Terminal, open the Terminal, click the + icon on top, and select Settings.
To add the Ubuntu (BASH) profile to the Windows Terminal, open the Terminal, click the + icon on top, and select Settings.
  1. Then, on the Settings page, click the “+ Add a new profile” => “+ New empty profile.”
  1. Finally, give the profile a name, and on the “Command line” field, enter this command
wsl --distribution Ubuntu -u root

Similarly, enter this on the icon field. When you finish, click the Save button.

https://assets.ubuntu.com/v1/49a1a858-favicon-32x32.png

Once you add the profile, it will be available to open!

When you add the profile with the command above, it opens the c:\widnows\system32 folder as the default folder when you launch the Ubuntu Distro. But, if you want it to open the home folder of the root user, change the command to…

wsl --distribution Ubuntu -u root -d ~

Now, if you launch the distro, it opens the root home folder by default.

Frequently Asked Questions

1. Does Windows Terminal support Bash?

Yes, Windows Terminal supports Bash but a BASH command-line tool must be installed on Windows before it can be added to the Windows Terminal

2. Can I run Bash in Windows?

Yes, the two common ways to run bash in Windows are either by installing Git or Ubuntu via the Windows Subsystem for Linux (WSL).

3. Why does Windows not have Bash?

Bash is available on Unix-based Operating Systems but not on Windows by default. To get Bash on Windows you must install Git (which includes Git Bash).

Alternatively, you can get Bash on Windows via the Windows Subsystem for Linux (WSL). b

4. Are Bash and CMD the same thing?

No, BASH is the command-line tool on Unix-based Operating Systems like Linux. However, CMD is the traditional command-line tool for the Windows Operating System.

5. Is PowerShell the same as Bash?

No, PowerShell is Microsoft’s command-line and scripting tool while BASH is the command-line interface and scripting tool on Unix and Linux.

Conclusion

Bash is not available on Windows PC by default. So, you cannot make the program available on Windows Terminal.

However, you can install Bash on a Windows PC in two ways – via git Bash or WSL. In this guide, I explained how to do both.

Kindly let us know the method you decide to use by leaving a comment utilizing the “Leave a Reply” form at the bottom of this page.

Alternatively, you can respond to the “Was this page helpful?” question below.

About the Author

Photo of author

Victor Ashiedu

Victor is the founder of InfoPress Media, publishers of Ilifeguides and Itechguides. With 20+ years of experience in IT infrastructure, his expertise spans Windows, Linux, and DevOps. Explore his contributions on Itechguides.com for insightful how-to guides and product reviews.

Related Articles

Get in Touch

We're committed to writing accurate content that informs and educates. To learn more, read our Content Writing Policy, Content Review Policy, Anti-plagiarism Policy, and About Us.

However, if this content does not meet your expectations, kindly reach out to us through one of the following means:

  1. Respond to "Was this page helpful?" above
  2. Leave a comment with the "Leave a Comment" form below
  3. Email us at [email protected] or via the Contact Us page.

Leave a comment

Send this to a friend