Install Linux Ubuntu into Windows 11 WSL system, and preparing the distro

Note: You should also read my newer article with updated and extended information: Install App Store WSL, Now Microsoft Recommended - Faster/Better

Youtube video of this article content


About WSL

Steps to install the “Windows Subsystem for Linux” (WSL) in Windows 11, update Ubuntu Linux, and install the NeoFetch app.

WSL is a subsystem to run a Linux system integrated with the Windows system.

WSL2 specifically added an actual Linux kernel rather than a mapping to windows base system calls. WSLg adds support for a Graphical User Interface using Wayland and XWayland (X11 implementation on Wayland).

With the newest WSLg, you can install Linux graphical applications that run on the Windows desktop.

Install WSL on Windows 11

The installation consists of two phases: installing WSL and then rebooting to finish installing the default Ubuntu distro.

Action: Open Windows Terminal App or cmd.exe or PowerShell and type the command:

wsl --install

After you type this, you will see it download and install each part of WSL, including the Ubuntu default Linux distro:

wsl install output pre-restart - Note: restart notice

Action: Restart Windows 11 Now.

Ubuntu install after reboot

When it starts up, wait till the terminal opens, this may take a while. It should ask you what username and password you want for logging into Ubuntu. You also use this password for the sudo command prefix (sudo prefix will request administrator (root) status when running Linux commands.

You should see this output:

post restart - Note: hello highlight of username/password entry, and update instructions

Update Ubuntu

Ubuntu and other Linux Systems require updating the software frequently. Linux uses ‘package management software’ to maintain up-to-date software. Ubuntu uses a package manager called apt, other distros may use different commands. We Need to now check for updates and then perform all the updates using the apt commands update and upgrade.

Action: enter the command and enter your ubuntu password when prompted.

sudo apt update

This command will synchronize all the places on the web that hold Ubuntu packages in what are called ‘repos’ to a local database. It will list how many packages need to be updated.

The last part of the ouput of the `sudo apt update` command

Action: enter the command to do the upgrade:

sudo apt upgrade

end of output from upgrade running

Install a terminal (CLI) app

The primary way you interact with the the installed Ubuntu is via the terminal. This installation is not a “Desktop” system, popular for general-purpose computing with a windows enviroment. It is just a ‘server’ version of Linux. But it will allow you to run graphical window apps as a window in the Windows Desktop environment. We will do that later.

Right now, we will install a CLI app called Neofetch.

Usually before installing a new app, you would synchronize your local package database with changes online using the sudo apt update, but since we just did that, you do not need to now.

Action: type the following command to install the neofetch application

sudo apt install neofetch

After the installation finishes, then run it by typing:

neofetch

You should see information about your system now, this is the output from my AMD base HP system:

Typical Neofetch Ouput

Updating the WSL System

To update the WSL system itself, you can open Windows terminal and type wsl --update

That’s it for this article, enjoy working with the newest WSLg on Windows 11.