This instruction shows how to install Ubuntu 22.04 on WSL2 on Windows 11.
Check available Linux distros
The first step is to check the available Linux distros on your system. Right-click the Windows icon and choose Terminal (Admin) to open Terminal and run the following command:
wsl -l -o
The command should return all the available Linux distros:
The following is a list of valid distributions that can be installed.
Install using ‘wsl.exe –install ‘.NAME FRIENDLY NAME
Ubuntu Ubuntu
Debian Debian GNU/Linux
kali-linux Kali Linux Rolling
Ubuntu-18.04 Ubuntu 18.04 LTS
Ubuntu-20.04 Ubuntu 20.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
OracleLinux_7_9 Oracle Linux 7.9
OracleLinux_8_7 Oracle Linux 8.7
OracleLinux_9_1 Oracle Linux 9.1
openSUSE-Leap-15.5 openSUSE Leap 15.5
SUSE-Linux-Enterprise-Server-15-SP4 SUSE Linux Enterprise Server 15 SP4
SUSE-Linux-Enterprise-15-SP5 SUSE Linux Enterprise 15 SP5
openSUSE-Tumbleweed openSUSE Tumbleweed
Install Ubuntu 22.04
You can install a distro using the NAME by running:
wsl --install -d Ubuntu-22.04
After installation, you can enter a UNIX username and password. This username could be different than the Windows username and will be used in Ubuntu. Windows will launch the installed Ubuntu and enter the command line mode.
List installed Ubuntu
If you want to check the installed Linux distros, run the following command:
wsl -l -v
Launch Ubuntu
To manually launch Ubuntu on WSL2, run the following command:
ubuntu2204
Log out Ubuntu
Run the following command to log out Ubuntu.
exit
Unregister Ubuntu
If you want to uninstall an installed system, run the following command:
wsl --unregister <DistroName>
In this case, run the following command will uninstall Ubuntu 22.04:
wsl --unregister Ubuntu-22.04
Hi, this is a comment.
To get started with moderating, editing, and deleting comments, please visit the Comments screen in the dashboard.
Commenter avatars come from Gravatar.