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
- Open the https://git-scm.com/downloads link. Then, on the Downloads section, click the Windows link.
- On the next page, click the highlighted link to download the latest version of the app.
- 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.
- Search “terminal” and open the app
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”.
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:
- 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.
- To add the Ubuntu (BASH) profile to the Windows Terminal, open the Terminal, click the + icon on top, and select Settings.
- Then, on the Settings page, click the “+ Add a new profile” => “+ New empty profile.”
- 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
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
Yes, the two common ways to run bash in Windows are either by installing Git or Ubuntu via the Windows Subsystem for Linux (WSL).
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
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.
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.