If you want to use Linux commands on a Windows machine, the easiest modern method is to install Linux Bash on Windows 10 through Windows Subsystem for Linux, usually called WSL. WSL lets you run a real Linux command-line environment directly inside Windows without setting up a full dual-boot system or managing a separate virtual machine.
This guide explains how to install Linux Bash on Windows 10 step by step in 2026. It covers the simple installation method, the manual method for older Windows 10 builds, Ubuntu setup, useful Bash commands, troubleshooting, and the best way to use WSL for development, server administration, Git, SSH, Linux scripting, and VPS management.
For most users, the process is simple: open PowerShell as administrator, run wsl --install, restart the computer, launch Ubuntu, create a Linux username, and start using Bash. However, there are a few important details that can prevent errors, especially on older Windows 10 systems, PCs with virtualization disabled, or machines where the Microsoft Store is restricted.
If your goal is to manage Linux servers, test Bash scripts, connect to a VPS, use Git, or learn Linux commands before working on a production server, WSL is one of the cleanest ways to get started. It gives you a Linux terminal while keeping your normal Windows desktop workflow.
What Is Linux Bash on Windows 10?
Linux Bash on Windows 10 means running the Bash shell from a Linux distribution inside Windows using Windows Subsystem for Linux. Bash is the command-line shell used by many Linux distributions. WSL is the compatibility layer that allows Linux user-space tools to run on Windows.
In simple terms, Bash is the terminal language you type commands into, while WSL is the Windows feature that makes the Linux environment possible. When you install Ubuntu on WSL, you get a Linux file system, package manager, shell, command-line tools, and access to common Linux software such as ssh, git, curl, nano, vim, rsync, and development packages.
This is useful if you want to:
- Learn Linux commands without leaving Windows.
- Use Bash scripts on a Windows 10 PC.
- Manage a Linux VPS over SSH.
- Run Git, Node.js, Python, PHP, Ruby, or other developer tools.
- Test server commands before using them on a live VPS.
- Work with Linux files, permissions, and package managers.
- Practice server administration before choosing a best server OS for production hosting.
WSL is not the same as installing a full Linux desktop environment. It is mainly designed for command-line workflows. You can run many Linux tools and, depending on setup, even some GUI applications, but the main value is fast terminal access from inside Windows.
WSL 1 vs WSL 2: Which One Should You Use?
Windows Subsystem for Linux has two main architecture versions: WSL 1 and WSL 2. For most users in 2026, WSL 2 is the better default choice.
WSL 1 translates Linux system calls into Windows system calls. It is lightweight and can work well for simple command-line tasks. WSL 2 uses a real Linux kernel running in a lightweight virtualized environment. This gives better compatibility with Linux software, Docker workflows, package managers, and modern development stacks.
| Feature | WSL 1 | WSL 2 |
|---|---|---|
| Architecture | Translation layer | Real Linux kernel |
| Linux compatibility | Good for basic tools | Better for modern Linux software |
| Docker support | Limited | Recommended |
| File access from Windows drive | Often faster in some cross-file workflows | Best when working inside the Linux file system |
| Best use case | Simple Linux commands | Development, Docker, server tools, modern Bash workflows |
If you are installing Linux Bash on Windows 10 for the first time, use WSL 2 unless you have a specific reason to use WSL 1. WSL 2 is the better fit for developers, Linux learners, SSH users, Git workflows, and anyone preparing to manage Linux VPS environments.
Requirements Before Installing Linux Bash on Windows 10
Before you install Bash on Windows 10, check a few requirements. This helps avoid errors such as “WSL 2 requires an update to its kernel component,” “virtual machine platform is disabled,” or “the requested operation requires elevation.”
1. Use a Supported Windows 10 Build
For the easiest installation path, use an updated Windows 10 system. The simple wsl --install command is the preferred modern installation method on supported Windows 10 versions. If your PC is running an older Windows 10 build, update Windows first or use Microsoft’s manual WSL installation steps.
To check your version, press Windows + R, type winver, and press Enter. You can also open PowerShell and run:
systeminfo | findstr /B /C:"OS Name" /C:"OS Version"
2. Use an Administrator Terminal
WSL installation changes Windows features, so you need administrator permission. Right-click PowerShell or Windows Terminal and choose Run as administrator.
3. Enable Virtualization in BIOS/UEFI
WSL 2 uses virtualization technology. On many PCs this is already enabled, but on some desktops or older laptops it may be disabled in BIOS or UEFI settings. Look for options such as Intel VT-x, Intel Virtualization Technology, AMD-V, or SVM Mode.
If virtualization is disabled, WSL 2 may fail even if Windows features are installed correctly.
4. Have Enough Disk Space
A basic Ubuntu WSL installation does not need a large amount of space, but development tools, packages, Docker images, logs, and project files can grow quickly. Keep several gigabytes free at minimum, and more if you plan to run heavy development stacks.
5. Decide Which Linux Distribution to Install
Most beginners should install Ubuntu on WSL. Ubuntu has strong documentation, broad package support, and a familiar package manager. Debian, Kali Linux, openSUSE, and other distributions are also available depending on your needs.
Method 1: Install Linux Bash on Windows 10 Using the Simple WSL Command
This is the best method for most users. It installs the required WSL features and installs a default Linux distribution, usually Ubuntu, unless you choose a different distribution.
Step 1: Open PowerShell as Administrator
Click the Start menu, search for PowerShell, right-click it, and select Run as administrator. You can also use Windows Terminal if it is installed.
Step 2: Run the WSL Install Command
In the administrator terminal, run:
wsl --install
This command installs Windows Subsystem for Linux and the required components. On many systems, it also installs Ubuntu as the default Linux distribution.
Step 3: Restart Your PC
After the command finishes, restart Windows 10. This allows the required Windows features to finish installing.
Step 4: Launch Ubuntu or Your Installed Linux Distribution
After restart, open the Start menu and search for Ubuntu. Launch it. The first launch may take a few moments while the Linux file system is created.
Step 5: Create Your Linux Username and Password
Ubuntu will ask you to create a Linux username and password. This is separate from your Windows login. Choose a simple username, then enter a password. You may not see characters while typing the password. That is normal in Linux terminals.
Step 6: Update Linux Packages
After the terminal opens, update the package lists and installed packages:
sudo apt update
sudo apt upgrade -y
You now have Linux Bash installed on Windows 10.
Method 2: Install a Specific Linux Distribution
If you do not want the default distribution, you can list available distributions and install the one you prefer.
List Available Distributions
wsl --list --online
You may see options such as Ubuntu, Debian, Kali Linux, openSUSE, and others.
Install Ubuntu
wsl --install -d Ubuntu
Install Debian
wsl --install -d Debian
Install Kali Linux
wsl --install -d kali-linux
For server administration, Ubuntu or Debian are usually the most practical choices. If you are learning security testing, Kali Linux may be useful, but it is not the best default distribution for general VPS management.
Method 3: Manual Installation for Older Windows 10 Builds
If wsl --install does not work, your Windows 10 installation may be older, missing updates, or blocked by policy. Microsoft provides manual WSL installation steps for those cases.
Open PowerShell as administrator and enable the Windows Subsystem for Linux feature:
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
Then enable the Virtual Machine Platform feature:
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
Restart your PC after enabling these features.
Then set WSL 2 as the default version:
wsl --set-default-version 2
After that, install Ubuntu or another Linux distribution from the Microsoft Store, or use the command-line installation method if available.
How to Check If WSL Is Installed Correctly
After installation, open PowerShell and run:
wsl --status
Then list installed distributions:
wsl -l -v
You should see your installed distribution and its WSL version. For example:
NAME STATE VERSION
* Ubuntu Running 2
If the version shows 2, you are running WSL 2. If it shows 1, you can convert the distribution to WSL 2:
wsl --set-version Ubuntu 2
Replace Ubuntu with the exact distribution name shown by wsl -l -v.
Essential First Commands After Installing Bash on Windows 10
Once Bash is installed, run a few basic setup commands to make your environment useful.
Update Your Linux System
sudo apt update
sudo apt upgrade -y
Install Common Tools
sudo apt install -y build-essential curl wget git unzip nano vim htop
This installs compilers, download tools, Git, editors, archive tools, and htop for system monitoring. If you want to go deeper into Linux performance checks, read our guide on Linux System Monitor tools.
Check Your Linux Version
lsb_release -a
Check Kernel Information
uname -a
Check Memory Usage
free -h
For a full guide, see check linux memory usage.
Check Disk Usage
df -h
Check Running Processes
top
Or use:
htop
These commands are useful before managing real Linux servers or comparing linux server management tools.
How to Open Bash on Windows 10
After installation, you can open Bash in several ways.
Option 1: Open Ubuntu from the Start Menu
Click Start, search for Ubuntu, and open it. This launches your Ubuntu Bash terminal.
Option 2: Use Windows Terminal
Windows Terminal gives you tabs and profiles for PowerShell, Command Prompt, and Linux distributions. After installing Ubuntu, Windows Terminal usually detects it automatically. Open Windows Terminal and choose Ubuntu from the dropdown menu.
Option 3: Use PowerShell or Command Prompt
Run:
wsl
To open a specific distribution:
wsl -d Ubuntu
This is useful if you have multiple Linux distributions installed.
How to Access Windows Files from Linux Bash
WSL lets you access your Windows drives from inside Linux. Your C drive is usually mounted at:
/mnt/c
For example, to access your Windows user folder:
cd /mnt/c/Users/YourWindowsUsername
You can list files with:
ls
However, for best Linux performance, especially with Node.js projects, Python environments, Git repositories, and Docker workflows, store your active Linux projects inside the WSL Linux file system. For example:
mkdir -p ~/projects
cd ~/projects
Working inside the Linux file system usually gives better performance for Linux tools than repeatedly accessing files on /mnt/c.
How to Access Linux Files from Windows
From Windows File Explorer, you can access WSL files by entering:
\\wsl$
You will see your installed Linux distributions. Open Ubuntu, then browse the Linux file system. This is useful for editing files with Windows tools, but be careful not to modify Linux system files unless you know what you are doing.
For code editing, many developers use Visual Studio Code with WSL integration. This allows the editor to run on Windows while the project tools run inside Linux.
How to Use Bash to Connect to a Linux VPS
One of the best reasons to install Linux Bash on Windows 10 is to manage remote servers. Instead of using a separate SSH client, you can connect directly from Bash.
Install OpenSSH tools if needed:
sudo apt install -y openssh-client
Connect to your server:
ssh username@server-ip-address
For example:
ssh root@203.0.113.10
If you use SSH keys, generate one with:
ssh-keygen -t ed25519 -C "your-email@example.com"
Then copy the public key to your server:
ssh-copy-id username@server-ip-address
Using Bash on Windows is especially helpful if you manage Linux servers, install web control panels, configure NFS, deploy Git repositories, or work with VPS hosting. For server-side work, you may also want to read install git server and best control panel for linux VPS.
How to Install Git in Linux Bash on Windows 10
Git is one of the first tools many users install after setting up Bash.
sudo apt update
sudo apt install git -y
Check the installed version:
git --version
Set your Git username and email:
git config --global user.name "Your Name"
git config --global user.email "you@example.com"
Clone a repository:
git clone https://github.com/example/project.git
Using Git inside WSL is often cleaner than mixing Windows Git and Linux tooling in the same project. If your production server runs Linux, working with Git inside Linux Bash keeps your local workflow closer to the server environment.
How to Install Node.js, Python, and PHP in WSL
WSL is useful for web development because it lets you run Linux versions of common developer tools.
Install Python
sudo apt install python3 python3-pip python3-venv -y
python3 --version
Install Node.js
You can install Node.js from Ubuntu packages:
sudo apt install nodejs npm -y
node -v
npm -v
For more control over Node.js versions, many developers use Node Version Manager, but the system package is fine for basic learning.
Install PHP
sudo apt install php php-cli php-mbstring php-xml php-curl -y
php -v
If you are testing websites before deploying to hosting, WSL gives you a Linux-like development environment without leaving Windows.
How to Use Bash Functions on Windows 10 Through WSL
Once Bash is working, you can create shell functions to automate repeated tasks. A Bash function is a reusable block of shell commands. For example:
server_update() {
sudo apt update && sudo apt upgrade -y
}
After defining it, run:
server_update
You can place functions in your ~/.bashrc file so they load automatically whenever Bash starts. For a full tutorial, see bash function.
This is useful when you manage multiple VPS servers or run the same setup commands often.
Best Practices After Installing Linux Bash on Windows 10
1. Keep WSL Updated
From PowerShell, run:
wsl --update
Then restart WSL:
wsl --shutdown
2. Keep Linux Packages Updated
Inside Ubuntu, run:
sudo apt update
sudo apt upgrade -y
3. Use the Linux File System for Linux Projects
For better performance, store projects under your Linux home directory, such as ~/projects, instead of working heavily from /mnt/c.
4. Use SSH Keys Instead of Passwords
If you connect to remote servers, SSH keys are safer and more convenient than typing passwords repeatedly.
5. Learn Basic Linux Permissions
Understand commands such as chmod, chown, and sudo. These matter when managing production Linux servers.
6. Do Not Treat WSL as a Full Production Server
WSL is excellent for development and learning, but it is not a replacement for a properly hosted VPS or dedicated server. If you need a public-facing website, production database, mail server, or application server, use proper hosting instead of exposing your Windows PC.
If you are comparing server options, read managed vs unmanaged VPS before choosing a plan.
Common WSL Troubleshooting Issues
Problem: The Requested Operation Requires Elevation
This usually means PowerShell or Windows Terminal was not opened as administrator. Close the terminal, right-click it, and choose Run as administrator.
Problem: WSL 2 Requires Virtualization Support
Enable virtualization in BIOS/UEFI. Look for Intel VT-x, AMD-V, or SVM Mode. After enabling it, boot into Windows and try again.
Problem: The Microsoft Store Is Blocked
On some business or school PCs, the Microsoft Store may be disabled. Use Microsoft’s manual installation method or ask the administrator to allow WSL distribution installation.
Problem: Ubuntu Does Not Open After Installation
Restart the PC, then run:
wsl -l -v
If Ubuntu is installed but stopped, start it with:
wsl -d Ubuntu
Problem: WSL Uses Too Much Memory
WSL 2 can dynamically use memory. If you run Docker, databases, and development tools, usage can increase. Shut it down when not needed:
wsl --shutdown
You can also monitor memory from Linux using free -h, top, or htop.
Problem: Internet Does Not Work Inside WSL
Try restarting WSL:
wsl --shutdown
Then open Ubuntu again. Also check VPN, firewall, DNS, and proxy settings if you are on a corporate network.
Should You Use WSL, a Virtual Machine, or a VPS?
WSL is not the only way to use Linux from Windows. You can also use a full virtual machine or a remote VPS. The best option depends on what you need.
| Option | Best For | Limitations |
|---|---|---|
| WSL | Linux commands, Bash scripts, development, SSH, Git | Not ideal as a public production server |
| Virtual machine | Testing full Linux desktops, isolated labs, OS experiments | Uses more RAM and storage |
| Linux VPS | Hosting websites, apps, databases, production services | Requires server management and security |
Use WSL if you want a Linux terminal on your Windows PC. Use a VM if you need a full Linux desktop or isolated lab. Use a VPS if you want a real server accessible online.
If you need to test virtualization inside a server environment, see our guide to VPS with Nested Virtualization.
Security Tips for Using Linux Bash on Windows 10
WSL runs on your local Windows machine, so you should think about both Windows and Linux security.
- Keep Windows updated.
- Keep your WSL distribution updated.
- Do not run random shell scripts from the internet without reviewing them.
- Use SSH keys for server access.
- Do not store production secrets in plain text.
- Use separate directories for projects.
- Be careful when editing files across Windows and Linux paths.
- Use official package sources when possible.
If you use WSL to manage production VPS servers, treat your laptop as an admin workstation. A compromised local machine can put remote servers at risk.
Who Should Install Linux Bash on Windows 10?
Installing Linux Bash on Windows 10 is useful for many types of users.
Developers
Developers can use Linux tools without leaving Windows. This is useful for Git, Python, Node.js, PHP, Docker workflows, shell scripts, APIs, and deployment tasks.
Students and Linux Beginners
WSL is a low-risk way to learn Linux commands. You do not need to erase your disk, dual boot, or install a separate Linux laptop.
VPS Users
If you manage a Linux VPS, WSL gives you a native-feeling SSH and Bash environment on Windows. It is more flexible than relying only on graphical tools.
System Administrators
Admins can use WSL for scripting, SSH, log parsing, text processing, automation, and working with Linux-based infrastructure.
Website Owners
If you manage hosting, WordPress, or web apps, WSL can help you understand Linux commands before using them on a real server.
Quick Command Cheat Sheet
| Task | Command |
|---|---|
| Install WSL | wsl --install |
| List online distributions | wsl --list --online |
| Install Ubuntu | wsl --install -d Ubuntu |
| List installed distributions | wsl -l -v |
| Set WSL 2 default | wsl --set-default-version 2 |
| Convert Ubuntu to WSL 2 | wsl --set-version Ubuntu 2 |
| Update WSL | wsl --update |
| Shut down WSL | wsl --shutdown |
| Update Ubuntu packages | sudo apt update && sudo apt upgrade -y |
| Install common tools | sudo apt install build-essential curl git unzip htop -y |
Conclusion
Installing Linux Bash on Windows 10 is one of the fastest ways to bring Linux command-line tools into a Windows workflow. For most users in 2026, the easiest method is to open PowerShell as administrator, run wsl --install, restart the PC, launch Ubuntu, create a Linux user, and update packages.
WSL is ideal for learning Linux, writing Bash scripts, using Git, connecting to VPS servers, testing commands, and building web development environments. It is not a full replacement for a production VPS, but it is an excellent local tool for anyone who works with servers or wants to become more comfortable with Linux.
If you plan to move from local learning to real hosting, use WSL to practice commands first, then deploy on a supported Linux VPS with proper backups, security, monitoring, and server management.
FAQ
Can I install Linux Bash on Windows 10?
Yes. You can install Linux Bash on Windows 10 by using Windows Subsystem for Linux. The easiest method is to open PowerShell as administrator and run wsl --install, then restart the computer and launch Ubuntu or another Linux distribution.
What is the command to install Linux Bash on Windows 10?
The main command is wsl --install. This installs Windows Subsystem for Linux and usually installs Ubuntu as the default Linux distribution on supported Windows 10 systems.
Do I need Windows 10 Pro to use WSL?
No. WSL can run on Windows 10 Home as well as Windows 10 Pro, as long as the system supports the required Windows version, features, and virtualization requirements.
Is WSL the same as a Linux virtual machine?
No. WSL 2 uses lightweight virtualization and a real Linux kernel, but it is designed to integrate with Windows rather than behave exactly like a full traditional virtual machine.
Which Linux distribution should I install on Windows 10?
Ubuntu is the best choice for most beginners because it has strong documentation, broad package support, and many tutorials. Debian is also a good lightweight option.
Can I use Linux Bash on Windows 10 to manage a VPS?
Yes. You can use Bash on Windows 10 to connect to a Linux VPS over SSH, manage files, run Git, use scripts, and perform basic server administration tasks.
Why is WSL 2 not working on my PC?
Common causes include an outdated Windows 10 build, disabled virtualization in BIOS or UEFI, missing Windows features, or a blocked Microsoft Store. Update Windows, enable virtualization, and check Microsoft’s manual WSL installation steps if needed.
Can I run graphical Linux apps with WSL?
Some graphical Linux apps can run with modern WSL setups, but the main purpose of WSL is command-line Linux tooling. For a full Linux desktop experience, a virtual machine may be better.
Is Linux Bash on Windows 10 safe?
Yes, if you keep Windows and your Linux distribution updated, avoid untrusted scripts, and secure your SSH keys and credentials. Treat WSL carefully if you use it to manage production servers.
Can I uninstall WSL later?
Yes. You can unregister Linux distributions with WSL commands and remove Windows Subsystem for Linux features if you no longer need them. Back up any important Linux files before uninstalling.