How to use ubuntu on windows

1. Overview

Windows Subsystem for Linux (WSL) allows you to install a complete Ubuntu terminal environment in minutes on your Windows machine, allowing you to develop cross-platform applications without leaving Windows.

In this tutorial, we’ll show you how to get up and running with Ubuntu on WSL. These instructions will work on both Windows 10 or Windows 11.

Whilst WSL is a powerful tool for all users, some features, such as the ability to run graphical Linux applications, are only available on Windows 11. Please check out our Windows 11 tutorial for more information.


2. Install WSL

Installing WSL is now easier than ever. Search for Windows PowerShell in your Windows search bar, then select Run as administrator.

At the command prompt type:

wsl --install

And wait for the process to complete.

For WSL to be properly activated, you will now need to restart your computer.


3. Download Ubuntu

WSL supports a variety of Linux distributions, including the latest Ubuntu release, Ubuntu 20.04 LTS and Ubuntu 18.04 LTS. You can find them by opening the Microsoft store app and searching for Ubuntu.

Choose the distribution you prefer and then click on Get as shown in the following screenshot:

Ubuntu will then install on your machine.

The one line install!

There is a single command that will install both WSL and Ubuntu at the same time.
When opening PowerShell for the first time, simply modify the initial instruction to:

wsl --install -d ubuntu

This will install both WSL and Ubuntu! Don’t forget to restart your machine before continuing.

Once installed, you can either launch the application directly from the store or search for Ubuntu in your Windows search bar.


4. Configure Ubuntu

Congratulations, you now have an Ubuntu terminal running on your Windows machine!

If Ubuntu returns an error during this initial installation, then the most common issue is that virtualisation is disabled in your device’s BIOS menu. You will need to turn this on during your device’s boot sequence. The location of this option varies by manufacturer, so you will need to refer to their documentation to find it.

Once Ubuntu has finished its initial setup you will need to create a username and password (this does not need to match your Windows user credentials).

Finally, it’s always good practice to install the latest updates with the following commands, entering your password when prompted.

sudo apt update

Then

sudo apt upgrade

Press Y when prompted.


5. Install your first package

Installing packages on Ubuntu is as easy as using a single command. Below, you will see how to install bpython, a simple python interpreter for trying out ideas, featuring some nice usability features like expected parameters and autocompletion.

To check that you have the latest package lists, type:

sudo apt update

Then install bpython:

sudo apt install bpython

To run the application type:

bpython

And you’re ready to go!


6. Customising your Terminal with Windows Terminal Preview

Since you’re likely to be using your Ubuntu terminal a fair bit, it’s always nice to do some customisation. We recommend installing Windows Terminal Preview to get the most user-friendly setup. You can find it in the Microsoft Store.

Windows Terminal allows you to open multiple Terminal instances as tabs, so you can have PowerShell running alongside Ubuntu. It also includes a number of customisation options. In the below screenshot, we’ve changed the tab name and colour, and configured the terminal appearance to use the Tango Dark theme and the Ubuntu font!

These customisations can be applied universally using the Appearance menu in Settings or to individual profiles which each have their own Appearance menu. Try it yourself to find something you feel comfortable with!


7. Enjoy Ubuntu on WSL!

That’s it! In this tutorial, you’ve seen how to install WSL and Ubuntu, set up your profile, and install your first package. You also got some tips on how to customise your experience.

We hope you enjoy working with Ubuntu inside WSL. Don’t forget to check out our blog for the latest news on all things Ubuntu.

Further Reading

  • Install Ubuntu on WSL2 on Windows 11 with GUI Support
  • Working with Visual Studio Code on Ubuntu on WSL2
  • Enabling GPU acceleration on Ubuntu on WSL2 with the NVIDIA CUDA Platform
  • Setting up WSL for Data Science
  • WSL on Ubuntu Wiki
  • Ask Ubuntu

Was this tutorial useful?

Thank you for your feedback.


Ubuntu is a popular, Linux-based, open-source operating system. In this Ubuntu installation guide, we will explore how to install Ubuntu Desktop from scratch, either to replace or alongside your current operating system.

Millions of laptops and PCs use the Ubuntu Desktop operating system, which comes pre-installed with an office suite, browser, media, and email apps, among others. Ubuntu Desktop is feature-rich, free, easy to install, customizable, and user friendly.

You can install Ubuntu on a computer running Windows, macOS, or FreeDOS. The process is pretty similar across operating systems. In this guide, we’ll demonstrate how to install Ubuntu Desktop on a Windows device.

Minimum System Requirements to Install Ubuntu

To install Ubuntu Desktop, you’ll need a computer with the following minimum system requirements:

  • 25GB of storage space
  • 4GB of RAM or system memory
  • 2GHz dual-core processor
  • Internet access
  • Either a USB port and an 8-12 GB FAT-32 formatted USB flash drive to create a live bootable USB drive
  • Or a DVD drive and a DVD to burn the Ubuntu ISO image

Ubuntu works on almost all desktops and laptops, but works best on Ubuntu certified hardware which meets or exceeds these minimum system requirements.

Read: How to Run OpenVPN on Ubuntu Server

Step 1: Back Up Your Data

If you plan to install Ubuntu on previously used hardware, we recommend that you back up your data to avoid potential data loss. If you’re using a previously used flash drive to download the Ubuntu ISO file, back up the flash drive.

Step 2: Download the Ubuntu ISO File

To get started, we need to download the Ubuntu ISO file. An ISO file—also known as an ISO image or optical image disc—is an archive file that contains an exact copy or image of the entire data found on a CD, DVD, or Blu-Ray. It is a technology that allows large file sets, including original software, to be distributed at scale and burned onto optical discs.

To download the Ubuntu Desktop ISO image, go to the Ubuntu download page. You’ll find two versions of Ubuntu Desktop: Ubuntu Desktop LTS (long-term support) which offers five years of support, and Ubuntu, which comes with only nine months of support.

Ubuntu download page with options for Ubuntu LTS and Ubuntu

Figure 1: Ubuntu download page

Scroll down the page and select your preferred package. For this tutorial, we’ll use Ubuntu LTS. Click the Ubuntu 22.04.2 download button (or the button for the current version) to start the download.

If you are installing an older version of Ubuntu or Ubuntu LTS, note that the layout and user interface may differ, but the overall flow and steps should remain the same.

Read: How to Set Up macOS on Bare Metal with Ubuntu Using Docker

Step 3: Download UNetbootin: a Bootable Live USB Drive Maker

To install Ubuntu via a USB flash drive, you’ll need a USB flashing tool to flash the Ubuntu ISO image onto the flash drive. For this guide, we’ll use UNetbootin. UNetbootin is a powerful and easy-to-use multi-platform SD card and USB flashing tool. Etcher and Rufus are also good options.

UNetbootin download page showing options for different operating systems

Figure 2: UNetbootin download page

While the Ubuntu ISO image is still downloading, go to the UNetbootin page and download and install the appropriate tool for your operating system. Skip this step if you prefer to install Ubuntu via a DVD instead of a USB flash drive.

If you’re using a DVD, you can burn the Ubuntu ISO image onto it using the built-in burner in your Windows 7, 8, 10, or 11 computer. Alternatively, you can download a third-party CD/DVD burner, like BurnAware or DeepBurner Free.

Step 4: Create a Live, Bootable USB Drive

After downloading the Ubuntu ISO file and installing the UNetbootin flashing tool, you’ll need to create a live, bootable USB drive. To do so, insert the flash drive into your computer’s USB port and run UNetbootin (grant permission if requested.)

Click Distribution, scroll all the way down the Select Distribution drop-down menu, and select Ubuntu. This will automatically populate the latest version. Select Diskimage, click on the three dots button to the right, select the Ubuntu ISO file you just downloaded, and click OK.

UNetbootin disk flashing tool to create a live, bootable USB drive

Figure 3: UNetbootin disk flashing tool

The process will start immediately and will take a few minutes to go through the four stages of flashing. Once completed, click Exit. Whichever USB flashing tool you use, ensure that you format the USB flash drive for FAT-32 (Windows.)

If you encounter a “write protected flash drive” error, use the SD Formatter tool to reformat the USB drive. Then try again to create the live, bootable USB drive, but this time, with a different flashing tool.

If using a DVD, insert the blank DVD into your computer’s DVD drive, right-click the Ubuntu ISO file, click Burn disc image, select the appropriate drive from the Disc burner drop-down, and click Burn.

Step 5: Boot From USB Flash Drive

After creating a live bootable USB flash drive or DVD, reboot your computer with the installation media still inside. If the Ubuntu installation window doesn’t appear automatically, reboot your computer again, and enter BIOS. Your computer will tell you which key to press to enter BIOS. For most computers, pressing F12 does the trick. On other computers, it could be F2, F10, Esc, or Del.

Now, go to Boot Order and select USB Storage Device as the primary boot device, or DVD drive if using DVD. If the BIOS menu lists your flash drive more than once, the rule of thumb is to go with the first mention or listing. Similarly, if there are multiple UEFI listings, always go with the first UEFI listing with your USB flash drive name.

If you can’t find your USB flash drive in the menu at all, select BIOS Setup > Advanced Boot Options > Enable Legacy Option ROMs > Apply. When in UEFI boot mode, this will allow Legacy Option ROMs to load.

Step 6: Install Ubuntu

On the next screen, you will have the option to either try or install Ubuntu.

Try Ubuntu

Choosing “Try Ubuntu” will not make any permanent changes to your computer. This is ideal if you’re still on the fence about using Ubuntu or have limited system resources. If you follow this route, you will still have the option to complete the installation later directly from the test homepage by clicking Install Ubuntu.

Install Ubuntu

Installing Ubuntu will overwrite any other operating system on your computer or in the allocated partition. This will erase all your data, including settings, documents, files, photos, and videos. Be sure to back up your data beforehand! Now, click Install Ubuntu.

Select your language; this is set to English (US) by default. Next, select your keyboard layout and click Continue.

Keyboard layout selector presented during the Ubuntu installation phase, showing US English as default

Figure 4: Keyboard layout selector

Step 7: Connect to the Internet

You can choose whether or not to connect to a wireless network, but we recommend doing so. An internet connection allows you to install third-party software, download updates, automatically detect your timezone, and install full support for your language. This way, you can hit the ground running.

Connecting to a wireless network as part of the Ubuntu installation process offers user benefits

Figure 5: Wireless network connection during Ubuntu installation

To connect to a wireless network, select the Connect to this network button, then select your Wi-Fi network, and click Connect. Enter your Wi-Fi password if required, click Connect, then click Continue. Note that you can also opt for a wired ethernet connection.

Read: How to Set Up Odoo on Ubuntu Using Docker

Step 8: Installation Setup

Next, you’ll be asked to install updates and other software. There are two options available: normal and minimal. Normal installation comes with a web browser, utilities, office software, games, and media players. Minimal installation comes with a web browser and basic utilities, and is ideal for light users or those with smaller hard drives.

On this screen, Ubuntu installation requires the user to select normal or minimal installation mode

Figure 6: Ubuntu updates and software installation

Under Other options, we recommend leaving Download updates while installing Ubuntu checked. This slows the initial installation, but saves having to install updates manually down the road. Also check Install third-party software for graphics and Wi-Fi hardware and additional media formats for the best experience. Then click Continue.

Installation Type

The next screen allows you to decide how you want to install Ubuntu. If you want Ubuntu to be the only operating system, select Erase disk and install Ubuntu. This will delete all your programs, documents, photos, music, and files in all operating systems. For this guide, we will choose Erase disk and install Ubuntu.

Choose Something else if you want to install Ubuntu alongside your current operating system. This option allows you to create or resize partitions yourself, or choose multiple partitions for Ubuntu. If you’re going this route, select the partition where you want to install Ubuntu or click New Partition Table…

On this screen, choose whether Ubuntu will replace your current operating system or run alongside it

Figure 7: Ubuntu installation partitioning

This will create a new partition table on your computer and replace all other partitions. You can undo this later if you wish. Then click Continue. Make your selection and click Install Now, then Continue. Review the warning information and click Continue.

Location, Timezone, and Personal Info Settings

Now, choose your location and set your time zone. If you are connected to the internet, this step won’t be necessary as Ubuntu will automatically detect your location and timezone. If it gets it wrong, simply edit the entry by typing your location in the location text box and click Continue.

Ubuntu will automatically detect your location and time zone if connected to the internet

Figure 8: Location and timezone settings

On the Who are you screen that follows, enter your name and your computer’s name, and a username will be auto-generated. You can always change these later. Then choose and confirm your password.

The “Who are you” screen automatically generates a username and requires password creation

Figure 9: Personal details for Ubuntu installation

Now, select how you want to log in, automatically or via a password. If you select the latter, Ubuntu will require the password every time you want to log in or perform certain tasks in the Terminal. There’s also an option to use Active Directory.

Sit back and wait for the installation to complete. Meanwhile, you can watch or scroll through the Ubuntu slideshow on the splash screen to get a feel for what to expect from Ubuntu. Once the installation is complete, remove the installation media and press Enter.

Step 9: Update Ubuntu

It’s always a good idea to try to update Ubuntu after installation to ensure you have the latest features, security patches, and software updates. There are two ways to update Ubuntu: via the Software Updater app or via Terminal.

Update Ubuntu via Software Updater

To update Ubuntu via Software Updater, you can either click on Search and type “Update” or click on the app menu (the icon with nine tiny squares in the bottom-left corner of your screen,) look for and click Software Updater, then Install now. You can also ask it to remind you later.

Update Ubuntu via Terminal

Terminal, command prompt, or shell, is Ubuntu’s native command line tool. Here’s how to update Ubuntu via Terminal. Either press Ctrl+Alt+T or click the app menu and select Terminal, then type the following commands and press Enter one after the other in this order:

sudo apt-get update

sudo apt-get upgrade

sudo reboot

Note that this process may take a few minutes depending on the number of updates available to install, and especially if you chose the minimal installation option during setup.

Step 10: Start Using Ubuntu

Congratulations! You’re now ready to start using Ubuntu for a variety of tasks. For instance, you can create and edit documents with LibreOffice which is a popular full office-suite compatible with DOC, DOCX, XLS, XLSX, PPT, and PPTX files. Other popular apps that can spice up your Ubuntu experience include WPS Office, VLC Media Player, GIMP, Steam, Kdenlive, Krita, VirtualBox, Google Chrome/Firefox/Brave, Scribus, OpenShot, Geary, Atom, and Darktable.

Conclusion

In this comprehensive guide, we’ve walked you through the detailed process of installing Ubuntu on a Windows device, starting from understanding the minimum system requirements, to the actual installation, and finally to updating the system. By following these steps, you should now be able to enjoy Ubuntu’s open-source capabilities and numerous pre-installed applications, providing you with a robust and user-friendly operating system experience.

Check out our other articles about Ubuntu that will take your experience to the next level:

  • How to Run OpenVPN on Ubuntu Server
  • How to Set Up macOS on Bare Metal with Ubuntu Using Docker
  • How to Set Up Odoo on Ubuntu Using Docker

From decades we are using Windows and Linux which are two different platforms. Sometimes we like windows for its smooth UI features and sometimes we want to move to Linux for some security purpose. But now Microsoft started to embrace the open-source community And Ubuntu is available on Microsoft Store. That means now ubuntu can be boot in windows 10 with no partition, using a USB drive, run in a window on your Windows desktop.

With Windows 10 fall creators update version 1709 Microsoft has introduced windows subsystem for Linux as an optional feature. That means No virtual machine is required and there is no dual booting, only you have to enable this feature and download the Ubuntu app from Microsoft store to run Ubuntu desktop on windows 10

Contents

  • 1 How to Run Ubuntu desktop on windows 10
    • 1.1 Enable Windows subsystem for Linux
    • 1.2 Download a Linux system from the Windows store
    • 1.3 Run Linux in Virtual Machine
    • 1.4 Run Linux Inside the Browser
    • 1.5 Run Linux Using USB or CD

Check compatibility

Well before start You just need to make sure that a window 10 is compatible with Linux requirements. open Settings > System > About, where you’ll find the System type entry here make sure you have a “64-bit operating system”. Again run winver command to check and make sure you have the latest version of Windows 10 installed on your system.

Run using SubSystem

So, what is exactly the subsystem in Ubuntu ( Linux )? It is a “Bash”. and Bash is a running Linux System inside the windows system.

Enable Windows subsystem for Linux

Well on Windows 10 you can enable Windows Subsystem for Linux feature using a simple command line on PowerShell or from windows feature.

Method 1 PowerShell

Search for PowerShell and run as Administrator.

When it opens a window the simply type below command and press enter key.

Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux

You’ll be asked to confirm your choice. Type Y or press enter and reboot your system.

Method 2 – Windows Feature

  • Open control panel search for programs,
  • Select the first option programs and features
  • Now on left-hand side click on Turn Windows Features On or Off.
  • This will open the windows features screen,
  • Scroll down and Checkmark next to Windows Subsystem for Linux.
  • Click ok to download required files from Microsoft server (Make sure you have a working internet connection)

Windows subsystem for Linux

As it will take slightly much time because of having large file size, you can see the Linux will installed in the windows as it is a regular application as it is one-time installation process. Restart Windows once the install process completes.

Download a Linux system from the Windows store

Now you have to download a Linux distro like Ubuntu for Windows to enter Linux commands to do this:

  • Open Microsoft Store, and search for ubuntu
  • Select option Ubuntu 18.0 and click get it

Note: At the time of writing, there are three versions of Ubuntu available on Microsoft Store: Ubuntu, Ubuntu 16.04 and Ubuntu 18.04.

install Ubuntu on Windows 10

  • It will take some time to download the app from the Microsoft server,
  • Once it completed click on launch
  • It will ask you for creating a new username and password, you need to provide all the information.

Run Ubuntu desktop on windows 10

Note: Windows File system will be located in the MNT folder, so to edit Windows files from the Linux system,  enter CD MNT, do LS then enter CD C and another LS to locate all the files stored inside Windows.

Now, you can enjoy your Linux on Windows.

Run Linux in Virtual Machine

The term virtual seems very geeky, but it is like another operating system over an existing Operating System. That you can run Linux over windows machine using Virtualization system Hyper V or using third party virtual machine. For that, you can download and install virtual machine software like VMWare Player on windows 10 PC. After that download VMware image for Ubuntu and extract the zip file.

Now double click the extracted ubantu.vmx file and the Linux machine will load inside the VMWare player. Thus Linux is “guest” OS while windows considered as “host” OS. You can install and boot Linux every time you start your machine if it will ask you to choose whether windows Os or Linux Os. You can select whatever you want, isn’t it great to switch to any of these two OS by just reboot it once.

Here, you already have a window, then you just need to install Linux. During the process of Linux installation, the installer knows how to resize its partition with windows and set up a boot loader by the given option.

Run Linux Inside the Browser

In such Case like if you are a beginner in Linux and if you want to learn Linux command, want to secure your file access within the browser, running legacy software, JavaScript engines benchmark or to use new browser technologies, you can go for JSLinux. This is an Emulator that lets you work in a web browser. You may able to write Shell Script and Awk, master regular expression, Lookup man pages of various Linux commands, etc. And everything inside the web browser.

There are certain other tools by which the user can run Linux on Windows browser like:

Copy.sh runs Linux 2.6 where the boot time is less than one minute for Linux. You can launch other operating systems too like windows 98, Arch Linux, Kolibri OS, Linux 2.6 and 3.18, Windows 1.01, FreeDOS, OpenBSD, Solar OS.

Webminal is GNU/Linux terminal to practice the Linux command and to interact with other users around the world. You just simply need to register on the website and that is completely free. Webminal is helping students of more than 125bcontries and also practiced commands more than 1.5 million.

Tutorials Point is like CentOS where the coding group gives a platform to practice the commands on the terminal in the browser, here the terminal is faster and starts within 10 seconds. There are not just Linux Terminal but also Node.js, PHP, Ruby, Numphy, Oracle Database and many online IDEs you can be browsed.

JS/UNIX Terminal where the Operating System for the web browser is written in JavaScript. There is a guest login in this terminal to practice the commands simply.

CB.VU gives you FreeBSD 7.1 stable version.

Run Linux Using USB or CD

Now the easiest way to use ubuntu is using a USB or CD drive. Simply Paste ubuntu setup in a USB drive, insert USB stick or DVD or CD into your local machine and then restart the computer, now the computer will boot from removable media and start work on ubuntu that making any changes into the computer’s hard drive.

With a live Ubuntu, you can do almost anything you can from an installed Ubuntu:

  • Safely browse the internet without storing any history or cookie data
  • Access files and edit files stored on your computer or USB stick
  • Create new office suite documents and save them remotely
  • Fix broken configurations to get a computer running again

Isn’t it looks so flexible to use Linux without disturbing current installed Windows Operating Systems? You can try any of these options where you feel comfortable to use and can easily switch to another windows UI .

Also read:

  • How To fix Windows Store cache may be damaged On Windows 10
  • 5 solutions to fix NTFS_FILE_SYSTEM error in Windows 10/8/7
  • Fix windows license will expire soon windows 10 
  • Windows 10 local account vs Microsoft account, which one is best for you?

This blog will offer an optimal solution for installing the latest as well as a specific version of Ubuntu in your Windows by using WSL.

What is WSL?

WSL (stands for “Windows Subsystem for Linux“) is a feature of Microsoft Windows that allows the user to run Linux distribution alongside Windows by utilizing a compatibility layer. It was released in 2016, however, the current version is WSL 2, which supports numerous Linux distributions including Ubuntu, Debian, and Fedora.

WSL is a beneficial feature for developers as it eliminates the need for extra hardware, virtualization, or dual-boot setups to manage Linux file systems or to access Linux command-line and tools.

With WSL, one can seamlessly switch between Windows and Linux workflows, enabling them to take advantage of Linux-specific tools while still enjoying the features of Windows as their primary operating system.

Let’s start the installation process of Ubuntu on Windows by using WSL 2.

Enable Windows Subsystem for Linux on Windows

To enable WSL, press the “Windows Logo + S” keys and search “Turn Windows features on or off”, then, click on the “Open” option.

Turn Windows Features

Turn Windows Features

The Windows feature dialogue box will open. Here, locate the option “Windows Subsystem for Linux” and select the checkbox associated with it. Finally, click on the “OK” button:

Enable Windows Subsystem for Linux

Enable Windows Subsystem for Linux

Now restart your Windows to enable WSL.

The process of installing Ubuntu on Windows by using WSL is quite straightforward.

To install the latest version of Ubuntu by utilizing WSL, simply run “Windows PowerShell” as administrator:

Windows PowerShell

Windows PowerShell

Then, type the command listed below to automatically install and set up WSL along with the default version of Ubuntu:

$ wsl --install

This command takes care of everything including turning on the required features of Windows, installing the WSL Linux kernel update package, and setting up Ubuntu.

Install Ubuntu on Windows

Install Ubuntu on Windows

Once the installation process completes, reboot your Windows system to access Ubuntu. After the reboot, the further installation and launching process of Ubuntu will automatically start and will consume some time, so wait for its completion:

Launching Ubuntu on Windows

Launching Ubuntu on Windows

The next step is to provide the username for Ubuntu (22.04) and also set its password. After it, you will be able to execute Ubuntu commands:

Setup Ubuntu on Windows

Setup Ubuntu on Windows

Let’s try this by executing, the apt update command:

$ sudo apt update

Update Ubuntu on Windows

Update Ubuntu on Windows

It is visible that your Ubuntu has started the process of updating the local repository cache.

Install Specific Ubuntu Version on Windows via WSL

However, if you want to install a specific previous version of Ubuntu on Windows. Then, head to Microsoft Store after following the previous steps or simply enables the Windows Subsystem for Linux as shown in the “Enable WSL” section of this blog:

Microsoft Store

Microsoft Store

In the Microsoft store, search for the desired version of Ubuntu. For instance, let’s search “Ubuntu 18.04”:

Search Ubuntu on Microsoft Store

Search Ubuntu on Microsoft Store

Then, click on the “Get” button and wait for the completion of the installation process:

Install Ubuntu via Windows Store

Install Ubuntu via Windows Store

Once the Ubuntu is installed, click on the “Open” button:

Open Ubuntu on Windows

Open Ubuntu on Windows

The Ubuntu 18.04 will launch successfully, now set its username and password:

Start Ubuntu on Windows

Start Ubuntu on Windows

You can even check the version of installed Ubuntu by executing the command mentioned below:

$ lsb_release -a 

Check Ubuntu on Windows

Check Ubuntu on Windows

Now close the terminal to shut down Ubuntu.

You can search Ubuntu to view and open your already installed Ubuntu from the Start Menu.

Search Ubuntu on Windows

Search Ubuntu on Windows
Conclusion

WSL (Windows Subsystem for Linux) is a feature offered by Microsoft that allows the user to run a Linux distribution alongside Windows 10. It supports many Linux distributions including Ubuntu, Fedora, and Debian.

This guide provided a solution for installing the latest/specific version of Ubuntu on Windows by using WSL.

WSL stands for Windows Subsystem for Linux and it is a feature that allows developers to install Linux distros in Windows where they can run Linux commands, applications, and utilities. WSL 2 is the newest version of WSL which is generally fast and more compatible.  However, some might want to use WSL 1 as it is more compatible with older versions of Windows, it provides better performance across OS file systems and it runs with current versions of VMWare and VirtualBox. In this article, I will show you how to install Ubuntu in WSL 1. In addition, follow this article to know how to install Ubuntu in WSL 2. Furthermore, you can see this article to know how to install Ubuntu in WSL using GUI.

Key Takeaways

  • Enabling the WSL feature in Windows.
  • Installing Ubuntu in Windows using WSL.
  • Checking installed distros and their corresponding WSL version.

Requirements

  • Windows Operating System.
  • Command Prompt.
  • Stable Internet Connection.

Process Flow Chart

[OS Used Throughout the Tutorial: Windows 11]Process flow chart for "wsl install ubuntu"

Here I will show how to install Ubuntu in WSL 1 in three steps.

Step 01: Enable WSL in Windows

In the beginning, I will enable the WSL feature in my Windows by the following steps.

Steps to Follow >

➊ Search the Command Prompt, left-click on the mouse, and then select “Run as administrator” to open it as administrator.Opening Command Prompt❷ To enable WSL, copy the following command and press ENTER:

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

EXPLANATION

  • exe: Services Windows images, such as updating, adding or removing features.
  • /online: Specifies that the command should be applied to the running operating system.
  • /enable-feature: Enables a specific Windows feature.
  • /featurename:Microsoft-Windows-Subsystem-Linux: Name of the feature being enabled.
  • /all: Enables all the parent features of the specified feature.
  • /norestart: Prevents the computer from automatically restarting after the feature is installed.

Enabling WSL feature for "wsl install ubuntu"You should see the “The operation completed successfully” message at the end of the process.

❸ Again, to enable Virtual Machine Platform, insert the following command and hit ENTER:

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

EXPLANATION

  • exe: Services Windows images, such as updating, adding or removing features.
  • /online: Specifies that the command should be applied to the running operating system.
  • /enable-feature: Enables a specific Windows feature.
  • /featurename:VirtualMachinePlatform: Name of the feature being enabled.
  • /all: Enables all the parent features of the specified feature.
  • /norestart: Prevents the computer from automatically restarting after the feature is installed.

Enabling the Virtual Machine Platform featureWait until you see the “The operation completed successfully” message. This process will enable the Virtual Machine Platform feature which allows users to run virtual machines natively on Windows.

❹ Then restart the computer.

Step 02: Install Ubuntu in WSL

Now I will install Ubuntu on WSL. However, you can install other distros as well.

Steps to Follow >

➊ At first, write the following command to list all the available distros and press ENTER:

wsl --list --online

EXPLANATION

  • wsl: Manages WSL.
  • –list: Lists installed or available distros.
  • –online: Lists only those distros which can be downloaded online.

Listing available Linux distrosHere, you can see the “Name” and “FRIENDLY NAME” of all the available distros. I will install “Ubuntu-22.04”.

❷ Now copy the following command to install Ubuntu and hit ENTER:

wsl --install Ubuntu-22.04

EXPLANATION

  • wsl: Manages WSL.
  • –install: Installs a new Linux distro.
  • Ubuntu-22.04: Name of the distro which is being installed.

❸ Give your username.

❹ Finally, set a password.Installing UbuntuRemember, this whole process can take a while. You should see the “Installation successful!” message and at the end, you will see a Ubuntu shell where you can run Linux commands.

Step 03: Change WSL Version

As I am showing you how to install Ubuntu in WSL 1, I will now change the WSL version to 1, which is 2 by default mostly.

Steps to Follow >

❶ First, open the Command Prompt as “Run as administrator

❷ Write the following command and hit ENTER:

wsl --set-version Ubuntu-22.04 1

EXPLANATION

  • wsl: Manages WSL.
  • –set-version: Sets WSL version of a distro.
  • Ubuntu-22.04: Name of the distro.
  • 1: WSL version.

Setting WSL versionThis process may take some time. Wait for the “The operation completed successfully” message.

❸ (Optional) To list the installed distros and their corresponding WSL version, use the following command:

wsl --list --verbose

OR,

wsl -l -v

EXPLANATION

  • wsl: Manages WSL.
  • -l,–list: LIsts distros that are currently installed.
  • -v,–verbose: Shows additional information.

Listing installed distros with their wsl versionAs you can see, the WSL version for Ubuntu is 1 which was our goal.

❹ Now you should find Ubuntu in your Windows like below.Finding Ubuntu in Windows

Conclusion

WSL is a useful feature as you don’t need to install an additional virtual machine to run Linux distros. In addition, it is lightweight and consumes less system resources. In this article, I have provided all the steps to install Ubuntu in WSL 1. Hopefully, you find this article helpful.

People Also Ask

Where is Ubuntu WSL installed?

The Ubuntu WSL is installed on a virtual disk named ext4.vhdx and it can be found under %userprofile%\AppData\Local\Packages\Canonical…\LocalState\ext4.vhdx

Is WSL installed?

To check if WSL is installed, you can use the command wsl -l -v in Powershell or Windows Command Prompt. This will show all the installed Linux distros and corresponding WSL versions.

Is WSL a virtual machine?

WSL feature allows a user to run Linux distro in Windows. It is not a virtual machine, however, it uses a virtual machine platform.

Do I need to enable Hyper V for WSL?

You don’t need to enable Hyper-V for WSL, however, you need to enable the Virtual Machine Platform feature.

Related Articles

  • Install Ubuntu in WSL Using GUI [3 Steps]
  • How to Install Ubuntu in WSL2 in Just 3 Steps

  • Hp 1012 драйвера для windows 7 x32
  • How to use pip on windows
  • Hp 1005 mfp драйвер windows 10 64 bit сканер
  • Hp 1010 драйвер windows vista x64
  • Hp 1005 drivers windows 10