How to Install Bash on Windows 11: A Step-by-Step Guide for Users

If you’re a developer, sysadmin, or power user, you’ve probably wanted to run Linux commands directly on Windows. Thanks to Windows Subsystem for Linux (WSL), you can install Bash on Windows 11 without needing a virtual machine or dual boot setup.

In this guide, we’ll walk you through how to install Bash on Windows 11 step by step, explain what it is, and cover tips, troubleshooting, and FAQs.


📝 Quick Summary

  • Bash on Windows 11 is available through Windows Subsystem for Linux (WSL).

  • You can install it via Command Prompt, PowerShell, or Microsoft Store.

  • It allows you to run Linux distributions (Ubuntu, Debian, Kali, etc.) directly on Windows.

  • Developers use it for coding, automation, and Linux utilities without leaving Windows.


What is Bash in Windows 11?

Bash (Bourne Again Shell) is the most common Linux shell used for command-line operations. On Windows 11, Bash comes with WSL (Windows Subsystem for Linux) — a compatibility layer that lets you run native Linux binaries alongside Windows apps.

Think of it as running Linux inside Windows, without needing VirtualBox or dual boot.


Why Install Bash on Windows 11?

Here’s why developers and power users install Bash:

  • ✅ Run Linux commands directly in Windows.

  • ✅ Install Linux tools (like grep, sed, awk, ssh).

  • ✅ Use package managers like apt, yum, or dnf.

  • ✅ Set up development environments (Node.js, Python, Ruby, Docker).

  • ✅ Practice Linux without leaving Windows.


Prerequisites Before Installing Bash

  • A PC running Windows 11 (64-bit).

  • Administrator privileges.

  • Internet connection to download Linux distributions.


Method 1: Install Bash via PowerShell (Recommended)

Step 1: Open PowerShell as Administrator

  • Press Windows + S, type PowerShell, right-click → Run as Administrator.

Step 2: Enable WSL

Run the command:

wsl --install

This will:

  • Enable Windows Subsystem for Linux.

  • Install the default distribution (Ubuntu).

  • Set up Bash automatically.

Step 3: Restart Your Computer

Restart to apply changes.

Step 4: Launch Ubuntu (Bash)

After reboot:

  • Open Start Menu > Ubuntu.

  • Set a username and password.

Now, you’re inside Bash! 🎉


Method 2: Install Bash Using Microsoft Store

If you want a specific Linux distribution:

  1. Open the Microsoft Store.

  2. Search for Linux (Ubuntu, Debian, Kali, openSUSE, etc.).

  3. Click Install on your preferred distribution.

  4. Once installed, launch it from Start Menu.

  5. Set up username and password.


Method 3: Manually Enable WSL and Install Bash

If the simple command doesn’t work, try this manual method:

Step 1: Enable WSL Feature

Run in PowerShell (Admin):

dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart

Step 2: Enable Virtual Machine Platform

dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart

Step 3: Restart PC

Reboot to apply changes.

Step 4: Install Linux Distribution

Download Ubuntu from the Microsoft Store or manually install via .appx package.


Using Bash on Windows 11

Once Bash is installed, you can:

  • Run commands like:

    ls
    pwd
    cat /etc/os-release
  • Install software with:

    sudo apt update && sudo apt install git
  • Use Bash for shell scripting, remote server management (SSH), or programming.


Switching Between Distributions

If you installed multiple distros:

wsl -l -v

This lists installed distros.

To set default:

wsl --set-default <DistroName>

Updating WSL and Bash

Run:

wsl --update

To check version:

wsl --version

Troubleshooting Common Issues

1. WSL command not recognized

  • Ensure Windows is updated (Windows 11 build 22000+).

  • Enable WSL via Control Panel > Turn Windows features on/off.

2. Cannot access internet inside Bash

  • Restart WSL:

    wsl --shutdown
  • Restart PC.

3. Error: Virtualization not enabled

  • Go to BIOS/UEFI settings → Enable Intel VT-x or AMD-V.


Pros and Cons of Bash on Windows 11

Pros

  • Run Linux tools on Windows seamlessly.

  • Lightweight compared to virtual machines.

  • Great for developers and students.

Cons

  • Not a full Linux kernel (though WSL2 comes close).

  • Some hardware-dependent tools may not work.

  • Requires setup for GUI apps.


Conclusion

Installing Bash on Windows 11 is simple and opens up a whole world of Linux possibilities. Whether you’re coding, automating, or just learning Linux, WSL makes it easy to run Bash without leaving Windows.

With just a few commands, you can install Ubuntu (or any Linux distro), run Bash scripts, and use Linux tools natively on Windows 11.


FAQs About Installing Bash on Windows 11

1. Does Windows 11 come with Bash pre-installed?
No, but you can install it easily using WSL.

2. Is WSL the same as a virtual machine?
No, it’s lighter — WSL runs Linux binaries directly on Windows.

3. Can I run GUI Linux apps in Windows 11?
Yes, with WSL2, you can run Linux GUI apps.

4. Which Linux distribution is best for WSL?
Ubuntu is the most popular, but Debian, Kali, and openSUSE also work great.

5. Is Bash on Windows 11 free?
Yes, it’s completely free via Microsoft Store or PowerShell.

Scroll to Top