It's been possible to run Ubuntu and other Linux distributions within Windows for some time now by making use of a virtualization tool such as VirtualBox.
But with Windows 11, you can use the bundled Windows Subsystem for Linux (or WSL for short) to run your favorite flavor of Linux without the need for either emulation or virtualization.
WSL is described as a "compatibility layer", which makes it possible to run Linux natively within Windows. Whether you need to use Linux for work, or whether you just like the idea of trying out a different app designed for a different operating system, WSL is here to help.
In this guide, we'll show you have to install Ubuntu within Windows 11 specifically, although the process is very similar for other Linux distros, too.
1. Make sure your PC is up to date
Before you start, it's important that you have the very latest version of Windows 11 installed, complete with all available updates. Open up Settings by pressing Windows + I, move to the Windows Update section and click Check for updates. Download and install any available updates and restart Windows, if prompted to do so.
Click the Start button, type windows features and click Turn Windows features on or off in the results. Scroll down through the list of options, check the box labelled Virtual Machine Platform, click OK and restart your computer, if necessary.
2. Search for 'Windows Subsystem' in the Store
Before you can install Ubuntu – or whichever version of Linux you're interested in – you first need to ensure that you have the Windows Subsystem for Linux installed. This is available to download from the Microsoft Store, so launch this app from the Start menu or using the taskbar shortcut.
In the search box at the top of the store, type windows subsystem and then select the entry for Windows Subsystem for Linux Preview. Click the Get button, wait for the software to download, and then click the Open button. In the future, you can also launch the software from the Start menu.
3. Using Command Prompt
If you're familiar with the Command line, you'll notice that what appears when Windows Subsystem for Linux Preview launches looks very similar. As the displayed message indicates, the next thing you need to do is to install a Linux distribution, and there are a couple of ways you can do this.
The first option is to use the Command Prompt to grab a distro, and you can check to see what's available by clicking the Start button, typing cmd, then pressing Enter to launch the Command Prompt.
4. Typing in commands
In the Command Prompt window that appears, you can quickly check to see which distros are available to install in this way by typing wsl.exe --list --online and pressing Enter. You'll see the names of some familiar Linux distros, such as Debian and openSUSE, in addition to Ubuntu.
You'll notice that there are two columns of text. Under the Friendly Name heading you'll see the full name of distros, while under Name you'll see the command you need to type to install that particular distribution.
5. Installing a Linux distro
If, for example, you were interested in installing openSUSE Leap 42, you can do so by typing the command wsl.exe --install openSUSE-42 and then pressing Enter; or Kali Linux by typing wsl.exe –install kali-linux and pressing Enter.
If you do decide to install a distro in this way, you'll see a progress bar as the download is under way. Once this is complete, the installation will begin. The exact process for installation varies from one distro to another, so just follow the instructions displayed.
6. Finding Ubuntu in the Microsoft Store
An easier option for installing Linux distributions, especially for newcomers, is to do so via the Microsoft Store. Ubuntu is one of the distros you can install in this way, so launch the Microsoft Store app, search for Ubuntu and click the Get button, just as you did when you were installing Windows Subsystem for Linux.
The download won't take too long – Ubuntu is less than 500MB in size – and once it's complete, a shortcut will be added to the Start menu so you can easily launch Ubuntu just like any other app.
7. Using the Terminal to install Ubuntu
The first time you launch Ubuntu – which is listed as Ubuntu on Windows in the Start menu – you'll be guided through the process of configuring the OS, starting off by choosing a username and configuring a password. Even though you've only just installed Ubuntu, it's a good idea to check for updates.
At the terminal, type sudo apt update and press Enter. Now type sudo apt full-upgrade and press Enter before following any on-screen instructions, starting with pressing Y to continue.
8. Installing a graphical interface
While there's much that can be done from the terminal, most people will be interested in running graphical Linux apps using WSL. One of the most famous Linux apps out there is the GIMP image editor, and this is a good place to start.
At the terminal, type sudo apt install gimp -y, press Enter, and wait while the software downloads and installs. Once the installation is complete, you can launch the app by simply typing gimp and pressing Enter. GIMP will launch ready for you to use, and you'll see that it's accessible in the taskbar as are other running apps.
9. Installing Linux apps
You can also install the X11 apps collection, which is made up of various tools such as a clock, calculator and clipboard. Type sudo apt install x11-apps -y and press Enter. Once installed, you can launch the calculator by typing xcalc and pressing Enter; the clock by typing xclock and pressing Enter, and so on.
If you type a space and & after the command to launch an app (for instance, xcalc &), you'll be returned to the terminal after the app launches. Other useful things to install include the Nautilus file manager (sudo apt install nautilus -y to install and nautilus to run), the media player VLC (sudo apt install vlc -y to install and vlc to run), and the Gedit text editor (sudo apt install gedit -y to install and gedit to run).
10. Installing a desktop environment
With Ubuntu, there's no option to easily install a desktop environment. If you opt to install Kali Linux instead, you have the ability to install the same apps and more, and you can also run Kali itself with a desktop of its own using Win-KeX.
Launch Kali, type sudo apt update and press Enter, and then type sudo apt install -y kali-win-kex before pressing Enter. You can then run the distribution in a window, complete with sound support, by typing kex --win -s and pressing Enter. This highlights the beauty of Linux and the versatility of WSL – there's an option to suit everyone.
A job for enthusiasts
We won't sugar-coat it; this guide isn't for beginners. If you're aware of Linux and you're keen on using it, then Windows 11 will grant that for you.
However, note that the above steps involve much use of Command Prompt, something that you'll most likely have never used. But if you have a weekend spare and you want to dip your toe into another operating system, Linux is a great to try.
- Our pick of the best Windows laptops so far in 2022
Get daily insight, inspiration and deals in your inbox
Get the hottest deals available in your inbox plus news, reviews, opinion, analysis and more from the TechRadar team.
Sofia is a tech journalist who's been writing about software, hardware and the web for nearly 25 years – but still looks as youthful as ever! After years writing for magazines, her life moved online and remains fueled by technology, music and nature.
Having written for websites and magazines since 2000, producing a wide range of reviews, guides, tutorials, brochures, newsletters and more, she continues to write for diverse audiences, from computing newbies to advanced users and business clients. Always willing to try something new, she loves sharing new discoveries with others.
Sofia lives and breathes Windows, Android, iOS, macOS and just about anything with a power button, but her particular areas of interest include security, tweaking and privacy. Her other loves include walking, music, her two Malamutes and, of course, her wife and daughter.