Table of Contents >> Show >> Hide
- What BASH on Windows 10 Actually Means
- Before You Install Anything
- Method 1: Install BASH with WSL on Windows 10
- Method 2: Manual WSL Install for Older Windows 10 Builds
- How to Set Up BASH After Installation
- How to Set Up SSH for GitHub in BASH
- Optional Tools That Make BASH on Windows 10 Even Better
- How to Install Git Bash on Windows 10 Instead
- Troubleshooting Common BASH-on-Windows Problems
- Final Thoughts
- Real-World Experiences and Lessons from Using BASH on Windows 10
Let’s clear up the first mystery right away: when people say they want BASH on Windows 10, they usually mean one of two things. They either want a real Linux Bash shell running on Windows through WSL (Windows Subsystem for Linux), or they want a lightweight Bash-like terminal that comes with Git Bash. Both are useful. One is a full-on Linux sidekick. The other is more like a practical multitool you keep in your pocket.
If your goal is software development, scripting, DevOps work, Docker, Python, Node.js, or just finally escaping the tyranny of backslashes for a while, WSL is the best way to install and set up Bash on Windows 10. It gives you a genuine Linux userland and Bash environment without forcing you into dual booting, spinning up a heavy virtual machine, or performing ritual sacrifices to the configuration gods.
This guide walks you through both approaches, with WSL as the recommended method and Git Bash as the easy alternative. You will learn how to install Bash, configure it properly, connect it to Git and GitHub, customize your startup files, and avoid the most common setup mistakes that make people stare at their terminal like it owes them money.
What BASH on Windows 10 Actually Means
Bash is the Bourne Again SHell, one of the most widely used command-line shells in Linux. On Windows 10, you can use Bash in two main ways:
Option 1: WSL Bash
This is the modern, recommended approach. WSL lets you install a Linux distribution such as Ubuntu and run Bash with real Linux tools, package managers, directories, and workflows. If you want a proper Linux command line on Windows, this is the winner.
Option 2: Git Bash
This comes with Git for Windows. It gives you a Bash-like shell and handy Unix-style tools like ls, cat, grep, and ssh. It is fast and convenient, especially for Git work, but it is not the same as running a full Linux environment.
Here is the practical rule: use WSL if you want real Linux behavior, and use Git Bash if you just want a friendly terminal for Git and light scripting.
Before You Install Anything
Before you dive into the install steps, check what version of Windows 10 you are running. Press Win + R, type winver, and hit Enter.
If you are on Windows 10 version 2004 or later, build 19041 or higher, you can usually install WSL with a single command. If you are on an older Windows 10 build, especially 1903 or 1909, WSL 2 still works, but the setup may require manual steps and specific build numbers. That matters because the smooth one-line method is lovely, and the manual method is a little more “some assembly required.”
You should also be ready to:
- Run PowerShell as Administrator
- Restart your PC at least once
- Make sure virtualization is enabled if you plan to use WSL 2
- Have a Microsoft Store-ready setup if you want the easiest distro install path
Method 1: Install BASH with WSL on Windows 10
This is the best method for most users because it installs a genuine Linux Bash environment. If your article title is How to Install and Setup BASH on Windows 10, this is the version your future self will thank you for.
Step 1: Open PowerShell as Administrator
Click Start, search for PowerShell, right-click it, and choose Run as administrator.
Step 2: Install WSL
Run this command:
On many modern Windows 10 systems, that single command enables the necessary Windows features, installs WSL, and installs Ubuntu by default. Then it asks for a restart.
If that command shows help text instead of installing anything, or if WSL is already partially installed, list the available Linux distributions first:
Then install a distro explicitly:
You can replace Ubuntu with another supported distribution if you prefer Debian, Kali, or something else. Ubuntu is still the easiest starting point for most people because tutorials, packages, and community support are everywhere.
Step 3: Restart Your Computer
Yes, the classic “turn it off and on again” moment has entered the chat. Do the restart. After rebooting, launch your new Linux distribution from the Start menu.
Step 4: Create Your Linux Username and Password
The first time Ubuntu or another distro opens, it will decompress files and then ask you to create a Linux username and password. This account is separate from your Windows account. Pick something simple, memorable, and not named batman unless you are prepared to commit to the bit.
Step 5: Confirm You Are Running WSL 2
Back in PowerShell, check your installed distributions:
If needed, set WSL 2 as the default for future installs:
If your distro somehow landed on version 1, upgrade it like this:
You can also set your preferred default distro:
Step 6: Update WSL and Your Linux Packages
From elevated PowerShell, update WSL itself:
Then open your Linux shell and update the packages inside the distro:
At this point, congratulations: you now have a proper Bash shell on Windows 10. The terminal did not explode. This is an encouraging sign.
Method 2: Manual WSL Install for Older Windows 10 Builds
If your Windows 10 machine is on an older build and the easy install method does not cooperate, you can still install Bash with the manual WSL path.
Enable the WSL Feature
Enable the Virtual Machine Platform Feature
Restart Windows
After restarting, install the WSL 2 Linux kernel update package from Microsoft’s official WSL manual-install flow, then run:
Finally, install your preferred distro from the Microsoft Store and launch it. This route is more hands-on, but it still gets you to the same destination: a Linux Bash shell on Windows 10.
How to Set Up BASH After Installation
Installing Bash is only half the story. A raw terminal works, but a configured terminal works with style. Here is how to make your setup cleaner, faster, and less annoying.
1. Customize Your .bashrc
Bash reads startup files such as .bashrc, .bash_profile, and .profile. For most interactive shell customization, .bashrc is the file you care about.
Open it with Nano:
Add a few useful starter lines:
Save the file, then reload it:
If you prefer editing with a Windows app, WSL also lets you do this:
That little cross-platform trick feels mildly magical the first time you use it.
2. Keep Your Project Files in the Right Place
This is one of the biggest performance and sanity tips in the entire Bash-on-Windows universe: store Linux-based projects inside the Linux file system, not in your Windows C: drive, when you plan to work on them with Linux tools.
A good path looks like this:
A less ideal path for Linux-heavy work looks like this:
Yes, WSL can access Windows files. But for speed and fewer weird edge cases, Linux tools are happiest when your files live in the Linux file system.
You can still open the current Linux folder in Windows File Explorer whenever you want:
3. Set Up Windows Terminal
Windows Terminal is a huge quality-of-life upgrade. It supports tabs, profiles, keyboard shortcuts, and better visual customization than the old console window. After installing it, open Settings and make your WSL distro the default profile if Bash is going to be your main shell.
This saves you from opening PowerShell first and then hopping into Linux like a commuter changing trains at rush hour.
4. Install Git Inside WSL
Even if you also install Git for Windows, it is smart to have Git available directly in your Linux environment:
Then configure your identity:
If you also install the latest Git for Windows, you get Git Credential Manager, which can help share authentication more smoothly between Windows and WSL. That is especially handy if you do not want every push and pull to feel like a tiny interrogation.
5. Fix Line Endings Before They Bite You
Windows and Linux do not use the same default line endings. If you work with the same repository from Windows tools and Linux tools, Git may suddenly report a bunch of changed files that are not actually changed in any meaningful way. That is terminal drama nobody asked for.
A simple .gitattributes file can help:
This keeps things more predictable, especially for web projects, scripts, and containers.
How to Set Up SSH for GitHub in BASH
If you use GitHub, setting up SSH is worth the effort. It makes authentication faster and cleaner than pasting credentials like you are solving a CAPTCHA in command-line form.
Install the OpenSSH client if needed:
Generate an SSH key:
Start the SSH agent and add your key:
Display the public key so you can copy it into your GitHub account:
Then test the connection:
Once SSH works, GitHub interactions feel much smoother. Fewer prompts, fewer interruptions, more actual work.
Optional Tools That Make BASH on Windows 10 Even Better
VS Code with WSL
If you use Visual Studio Code, open a project in Bash and run:
With the WSL extension installed, VS Code can edit and debug code directly inside your Linux environment. It is one of the nicest dev workflows on Windows 10 because you get Windows comfort with Linux muscle.
Docker Desktop with WSL 2
If containers are part of your workflow, Docker Desktop integrates with WSL 2 and is usually the smoothest route on Windows 10. The key idea is simple: keep WSL updated, use a WSL 2 distro, and enable WSL integration in Docker settings.
GitHub CLI
If you live in the terminal, GitHub CLI is a great add-on:
It helps you work with repositories, pull requests, issues, and authentication without bouncing between browser tabs like a caffeinated squirrel.
How to Install Git Bash on Windows 10 Instead
Maybe you do not need a full Linux environment. Maybe you just want a command line that understands ls, ssh, and Git commands without making Windows feel like it is fighting back. In that case, install Git Bash.
Step 1: Install Git for Windows
You can install the latest maintained build from the official Git for Windows project, or use:
Step 2: Launch Git Bash
After installation, open the Start menu and launch Git Bash. You will get a Unix-like shell with Git built in and a familiar Bash-style prompt.
Step 3: Configure Git
Git Bash is excellent for:
- Using Git on Windows
- Running lightweight shell scripts
- Using SSH and common Unix utilities
- Avoiding the awkwardness of old-school Command Prompt for developer tasks
Git Bash is not ideal if you need apt-based package installs, full Linux compatibility, container-heavy workflows, or Linux-native development behavior. That is where WSL pulls ahead.
Troubleshooting Common BASH-on-Windows Problems
Problem: wsl --install does nothing useful
Try wsl --list --online and then install a distro explicitly with wsl --install -d Ubuntu. If installation stalls, updating WSL or using the web-download install path may help.
Problem: WSL 2 will not start
Check that virtualization is enabled and that the Virtual Machine Platform feature is turned on. Older Windows 10 builds can be picky here.
Problem: Your Bash customizations do not show up in VS Code
VS Code’s WSL remote flow does not automatically run normal shell startup scripts in every case. If you need special environment setup for the VS Code server, use the dedicated server environment setup file instead of assuming .bashrc will always do the job.
Problem: Git shows tons of fake file changes
That is usually a line-ending mismatch. Use a consistent .gitattributes strategy and avoid editing the same repo with mixed assumptions about CRLF and LF.
Problem: Everything feels slow
If you are running Linux tools against files under /mnt/c/..., move the project into your Linux home directory and work there instead. That one change often makes WSL feel dramatically better.
Final Thoughts
If you want the best way to install and set up Bash on Windows 10, go with WSL 2. It gives you real Linux behavior, excellent compatibility, strong developer tooling, and a setup that feels modern instead of patched together with duct tape and optimism. Pair it with Windows Terminal, VS Code, and a clean .bashrc, and you have a seriously capable environment.
If you only need Git commands and a Bash-flavored terminal, Git Bash is still a terrific shortcut. It is quick, lightweight, and far better than pretending Command Prompt was designed for this century.
Either way, Windows 10 no longer forces you to choose between a familiar desktop and a good shell. You can absolutely have both. Which is nice, because the terminal should be a tool for getting work done, not a side quest in emotional resilience.
Real-World Experiences and Lessons from Using BASH on Windows 10
One of the most common experiences people have when setting up Bash on Windows 10 is the moment they realize there are really two different goals. At first, many users think, “I just need Bash.” Then they install Git Bash, run a few commands, and feel pretty happy. ls works, git works, SSH works, and life seems good. But then they try to install Linux packages with apt, run a Docker-based project, follow a Linux tutorial word for word, or build something that expects a full Linux environment. That is usually the moment Git Bash politely tips its hat and says, “I’m helpful, but I’m not actually Ubuntu.”
That is why WSL tends to become the long-term favorite. In real use, the first time you open Ubuntu on Windows 10 and run a normal Linux command chain like sudo apt update && sudo apt upgrade -y, it feels less like a clever hack and more like Windows finally learned to cooperate. Developers who work with Node.js, Python, Ruby, PHP, Docker, or shell scripts often notice that tutorials suddenly become easier to follow because the commands match what Linux-focused documentation expects.
Another common experience is the file-system learning curve. New users often keep their code under C:UsersNameProjects and access it from WSL through /mnt/c/Users/Name/Projects. Technically, that works. Practically, it can be slower and sometimes weird. After a while, many people move their Linux-based projects into ~/projects inside WSL and immediately notice the difference. Commands feel snappier, toolchains complain less, and the whole setup starts behaving like a real development environment instead of a compromise.
There is also a funny emotional phase where people bounce between Windows and Linux tools and feel mildly confused for a few days. You forget whether you are supposed to open PowerShell, Windows Terminal, Git Bash, or Ubuntu. You wonder why one shell sees one set of paths and another shell sees something else. Then, slowly, patterns emerge. Windows Terminal becomes the front door. WSL becomes the serious workspace. Git Bash becomes the quick utility shell you still appreciate for lightweight tasks. Once that mental map clicks, the entire setup becomes much easier to live with.
Git and GitHub setup is another area where experience matters. The first successful SSH key setup often feels like a rite of passage. Before that, every push can feel like you are being asked to prove your identity at airport security. After SSH is configured correctly, the workflow becomes quiet and efficient. It is one of those small wins that makes the command line feel professional rather than fussy.
Finally, nearly everyone who sticks with Bash on Windows 10 ends up customizing the shell. Maybe it starts with one alias. Then another. Then a cleaner prompt. Then code . becomes second nature. Then you open Linux folders in File Explorer with explorer.exe . and feel like you have discovered a secret passage between worlds. That is really the bigger experience of Bash on Windows 10: it starts as an installation task, but it often becomes a workflow upgrade. Once it is set up well, going back to a bare default terminal can feel like trying to write a novel with a broken pencil.
