The desire to explore alternative operating systems or leverage specific Linux-based tools is a common aspiration for many Windows 10 users. Ubuntu, a popular and user-friendly Linux distribution, offers a robust environment for development, server administration, and general computing. Fortunately, Microsoft has made it increasingly seamless to integrate Ubuntu directly within Windows 10, eliminating the need for complex dual-boot setups or virtual machines. This guide will walk you through the process of installing Ubuntu Linux on Windows 10, empowering you to harness the power of both operating systems concurrently.
Understanding Windows Subsystem for Linux (WSL)
At the heart of integrating Linux environments into Windows lies the Windows Subsystem for Linux (WSL). Introduced by Microsoft, WSL allows developers to run a GNU/Linux environment — including most command-line tools, utilities, and applications — directly on Windows, unmodified, without the overhead of a traditional virtual machine or dual-boot setup. WSL distributes are installed directly from the Microsoft Store, simplifying the installation and management process. For Ubuntu specifically, WSL provides a deeply integrated experience, allowing you to access your Windows file system from within Ubuntu and vice versa.

There are two main versions of WSL: WSL 1 and WSL 2. WSL 1 uses a translation layer to convert Linux system calls into Windows system calls, offering good compatibility but with some performance limitations. WSL 2, on the other hand, utilizes a lightweight virtual machine that runs a real Linux kernel, offering significantly improved performance, full system call compatibility, and the ability to run more demanding applications. This guide will focus on installing Ubuntu using WSL 2, as it represents the most advanced and capable option.
Enabling WSL and Virtual Machine Platform
Before you can install any Linux distribution, you need to ensure that the necessary Windows features are enabled. This involves activating the “Windows Subsystem for Linux” and the “Virtual Machine Platform.”
Enabling Windows Subsystem for Linux
- Open PowerShell as Administrator: The easiest way to do this is by right-clicking the Start button and selecting “Windows PowerShell (Admin)” or “Command Prompt (Admin)”.
- Execute the WSL installation command: In the elevated PowerShell window, type the following command and press Enter:
powershell
wsl --install
This single command is a game-changer. It automatically enables the required optional features, downloads the latest Linux kernel, sets WSL 2 as the default, and installs your preferred Linux distribution (which is Ubuntu by default if you don’t specify otherwise). If you want to be explicit, you can also use:
powershell
dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart
- Restart your computer: After the command completes, you will be prompted to restart your computer for the changes to take effect.
Enabling Virtual Machine Platform
While wsl --install usually handles this, it’s good practice to verify or manually enable the “Virtual Machine Platform” if you encounter issues.
- Open PowerShell as Administrator (as described above).
- Execute the command to enable the Virtual Machine Platform:
powershell
dism.exe /online /enable-feature /featurename:VirtualMachinePlatform /all /norestart
- Restart your computer: Again, a restart is necessary for these changes to be applied.
Installing Ubuntu from the Microsoft Store
Once WSL and the Virtual Machine Platform are enabled and your system has been restarted, the wsl --install command should have automatically initiated the installation of Ubuntu. If it did not, or if you wish to install a different distribution or a specific version of Ubuntu, you can do so manually through the Microsoft Store.
- Open the Microsoft Store: Search for “Microsoft Store” in the Windows search bar and open the application.
- Search for Ubuntu: In the Microsoft Store’s search bar, type “Ubuntu” and press Enter. You will see various Ubuntu versions available, such as “Ubuntu,” “Ubuntu 20.04 LTS,” “Ubuntu 22.04 LTS,” etc. It’s generally recommended to install the latest Long-Term Support (LTS) version for stability.
- Select and Install: Click on the Ubuntu version you wish to install and then click the “Get” or “Install” button. The download and installation process will begin. This can take some time depending on your internet connection speed.
Initial Setup of Ubuntu
After the installation from the Microsoft Store is complete, you’ll need to perform a brief initial setup for your Ubuntu environment.
- Launch Ubuntu: You can launch Ubuntu by searching for “Ubuntu” in the Windows Start menu and clicking on the application icon. The first time you launch it, a console window will appear, and you’ll see messages indicating that the installation is being unpacked.
- Create a Username and Password: You will be prompted to enter a new username and password for your Ubuntu instance. This username and password are not related to your Windows credentials. Choose a strong password, as you will need it to perform administrative tasks within Ubuntu using
sudo. - Update Package Lists: Once you’ve successfully logged in, it’s crucial to update the package lists to ensure you have access to the latest software versions and security patches. Open the Ubuntu terminal and run the following commands:
bash
sudo apt update
This command fetches the latest information about available packages from the repositories.
bash
sudo apt upgrade
This command installs any available updates for your installed packages. You will be prompted for your Ubuntu password to execute these commands with superuser privileges (sudo).
Accessing Your Windows Files from Ubuntu
A key advantage of WSL is the seamless integration with your Windows file system. Your Windows drives are automatically mounted within your Ubuntu environment, making it easy to access and manage files across both operating systems.
Locating Your Mounted Drives
Your Windows drives (C:, D:, etc.) are typically mounted under the /mnt/ directory within your Ubuntu file system.
- Navigate to the
/mnt/directory: In your Ubuntu terminal, use thecdcommand to change your directory:
bash
cd /mnt/
- List the mounted drives: Use the
lscommand to see which drives are mounted:
bash
ls
You will typically see directories namedc,d, and so on, corresponding to your Windows partitions. - Access your files: To access files on your C: drive, for example, you would navigate to
/mnt/c/Users/<YourWindowsUsername>/or wherever your desired files are located.
Accessing Ubuntu from Windows

Similarly, you can access your Ubuntu file system from Windows.
- Open File Explorer: In Windows, open File Explorer.
- Type the WSL path: In the address bar of File Explorer, type
\wsl$and press Enter. - Browse your distributions: You will see a list of your installed Linux distributions. Click on the “Ubuntu” folder to browse its file system. You can then navigate to your home directory (typically
/home/<yourUbuntuUsername>/) and access your files.
Working with the Ubuntu Terminal and GUI Applications
The primary interface for interacting with Ubuntu on WSL is the command-line terminal. However, the integration has advanced to the point where you can also run graphical applications.
Running Command-Line Tools
You can now use a vast array of Linux command-line tools directly from your Ubuntu terminal. This includes:
- Package Management:
aptfor installing, removing, and managing software. - Development Tools:
git,gcc,python,node.js, and many more. - Text Editors:
nano,vim,emacs. - Shell Utilities:
grep,sed,awk.
For example, to install Git:
sudo apt install git
Running GUI Applications (WSLg)
With the advent of WSLg (Windows Subsystem for Linux GUI), running graphical Linux applications on Windows has become remarkably straightforward. This feature is built into Windows 11 and can be enabled on Windows 10.
- Ensure WSLg is enabled: If you installed Ubuntu on a recent version of Windows 10 or Windows 11 using the
wsl --installcommand, WSLg should be enabled by default. If you installed manually or are on an older build, you might need to update your WSL installation. - Install a GUI application: From your Ubuntu terminal, install a graphical application as you normally would. For example, to install the Gedit text editor:
bash
sudo apt install gedit
- Launch the GUI application: After installation, simply type the application’s name in the Ubuntu terminal and press Enter:
bash
gedit
The Gedit window should appear on your Windows desktop as if it were a native Windows application. This works for many popular Linux GUI applications, including web browsers, IDEs, and more.
Advanced Configuration and Use Cases
The integration of Ubuntu with Windows 10 opens up a world of possibilities for developers, system administrators, and enthusiasts.
Setting a Default Distribution
If you have multiple Linux distributions installed via WSL, you can set your preferred one as the default. This is the distribution that launches when you simply type wsl in a Windows terminal.
wsl --set-default <DistributionName>
Replace <DistributionName> with the name of your Ubuntu distribution (e.g., Ubuntu-22.04).
Managing WSL Distributions
You can list, unregister, and manage your WSL distributions from PowerShell.
- List installed distributions:
powershell
wsl --list --verbose
or
powershell
wsl -l -v
- Unregister a distribution (this will delete all data associated with it):
powershell
wsl --unregister <DistributionName>
Running Docker on WSL 2
WSL 2 provides an excellent platform for running Docker containers. Docker Desktop for Windows now integrates seamlessly with WSL 2, allowing you to build and run containers with native performance. This is a highly sought-after setup for modern software development workflows.
Development Environments
With Ubuntu on WSL, you can set up complete development environments for various programming languages and frameworks. You can install IDEs like VS Code (which has excellent WSL integration), compilers, interpreters, databases, and version control systems, all within your Linux environment, while still leveraging Windows for other tasks.

Conclusion
Installing Ubuntu Linux on Windows 10 using the Windows Subsystem for Linux (WSL) is a powerful and accessible way to combine the strengths of both operating systems. Whether you’re a developer needing a Linux environment for coding and testing, a system administrator looking to manage Linux servers, or simply an enthusiast eager to explore the Linux ecosystem, WSL provides a robust, integrated, and high-performing solution. By following these steps, you can unlock a new level of productivity and flexibility on your Windows machine.
