It’s been awhile since I installed WSL (Windows Subsystem for Linux) with Ubuntu on Windows 10. When I installed the Ubuntu App in the Microsoft Store, it installed Ubuntu 18.04 LTS under WSL version 1. Currently, WSL is at version 2 (specifically 2.7.12 stable release) and Ubuntu is at version 26.04 LTS, so I want to upgrade both to the latest versions.
You can find my initial WSL and Ubuntu installation instructions at Install Subversion on Ubuntu WSL on Windows 10.
Upgrade WSL
To upgrade to WSL 2, run “Windows PowerShell” as administrator and input the following:
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 1
# Set the default WSL version to 2 (this does not affect current working version 1)
PS C:\WINDOWS\system32> wsl --set-default-version 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
The operation completed successfully.
# Get default status
PS C:\WINDOWS\system32> wsl --status
Default Distribution: Ubuntu
Default Version: 2
WSL2 is not supported with your current machine configuration.
Please enable the "Virtual Machine Platform" optional component and ensure virtualization is enabled in the BIOS.
Enable "Virtual Machine Platform" by running: wsl.exe --install --no-distribution
For information please visit https://aka.ms/enablevirtualization
# Enable the virtual machine platform per the above instruction
PS C:\WINDOWS\system32> wsl.exe --install --no-distribution
Installing Windows optional component: VirtualMachinePlatform
Deployment Image Servicing and Management tool
Version: 10.0.19041.3636
Image Version: 10.0.19045.6456
Enabling feature(s)
[==========================100.0%==========================]
The operation completed successfully.
The requested operation is successful. Changes will not be effective until the system is rebooted.
WSL version 2 requires virtualization to be enabled in the BIOS. On my HP ProDesk 400 G3 MT desktop, after entering the BIOS (press F10 on startup), I found two options related to virtualization under Advanced and “System Options”, “Virtualization Technology (VTx)” and “Virtualization Technology for Directed I/O (VTd)”. I enabled both just in case.
After restarting, I got the following result without any request for additional changes:
PS C:\WINDOWS\system32> wsl --status
Default Distribution: Ubuntu
Default Version: 2
We are now ready to upgrade WSL 1 to WSL 2.
# (this can take over 5 minutes to complete)
wsl --set-version Ubuntu 2
For information on key differences with WSL 2 please visit https://aka.ms/wsl2
Conversion in progress, this may take a few minutes.
The operation completed successfully.
# Check WSL version
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 2
# WSL 2 has a version flag which shows the specific version
PS C:\WINDOWS\system32> wsl --version
WSL version: 2.7.12.0
Kernel version: 6.18.33.2-2
WSLg version: 1.0.73.2
MSRDC version: 1.2.7214
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.26100.1-240331-1435.ge-release
Windows version: 10.0.19045.7663
Upgrade Ubuntu
Now I need to upgrade Ubuntu to the latest version. Launch the Ubuntu terminal by running the Ubuntu app and inputting the following to check the current version:
~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.4 LTS
Release: 18.04
Codename: bionic
# Another way to get the Ubuntu version
~$ cat /etc/os-release
NAME="Ubuntu"
VERSION="18.04.6 LTS (Bionic Beaver)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 18.04.6 LTS"
VERSION_ID="18.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=bionic
UBUNTU_CODENAME=bionic
To upgrade Ubuntu, I found some instructions on the web and tried it:
sudo apt update
sudo apt dist-upgrade -y
sudo apt autoremove --purge -y
# install the update-manager-core package
sudo apt install update-manager-core -y
...
E: Unable to locate package update-manage-core
# start the release upgrade
sudo do-release-upgrade
...
Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
=== Command terminated with exit status 1 (Sun Oct 19 22:18:33 2025) ===
Note: The sudo/root password was set when you first installed Ubuntu. If you forgot it, you can run as root user with “wsl -u root” and do a password reset “passwd”.
The last two commands failed so I was not able to upgrade Ubuntu. I will need to delete the current Ubuntu installation and then install the latest distribution.
In the Windows PowerShell, run the following:
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
# Stop the Ubuntu distribution if it is currently running
PS C:\WINDOWS\system32> wsl --terminate Ubuntu
The operation completed successfully.
# Check the WSL status again
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 2
# Remove the Ubuntu distribution
PS C:\WINDOWS\system32> wsl --unregister Ubuntu
Unregistering.
The operation completed successfully.
# Check the WSL status to make sure Ubuntu was removed
PS C:\WINDOWS\system32> wsl -l -v
Windows Subsystem for Linux has no installed distributions.
You can resolve this by installing a distribution with the instructions below:
Use 'wsl.exe --list --online' to list available distributions
and 'wsl.exe --install <Distro>' to install.
# List the available distributions
PS C:\WINDOWS\system32> wsl --list --online
The following is a list of valid distributions that can be installed.
Install using 'wsl.exe --install <Distro>'.
NAME FRIENDLY NAME
Ubuntu Ubuntu
Ubuntu-26.04 Ubuntu 26.04 LTS
Ubuntu-24.04 Ubuntu 24.04 LTS
Ubuntu-22.04 Ubuntu 22.04 LTS
...
# Install the latest Ubuntu (without any version suffix means latest which is 26.04 LTS)
PS C:\WINDOWS\system32> wsl --install Ubuntu
Downloading: Ubuntu
Installing: Ubuntu
Distribution successfully installed. It can be launched via 'wsl.exe -d Ubuntu'
Launching Ubuntu...
Provisioning the new WSL instance Ubuntu
This might take a while...
Create a default Unix user account: your_username
...
# At this point, WSL will automatically log into the Ubuntu distribution
Strangely, the “Ubuntu on Windows” app under the Settings app’s “Apps & features” section still showed an old 2022 installation date. So I uninstalled it using the Settings app. This did not affect the Ubuntu 26.04 LTS version which I had installed using the WSL command line above. My guess is that using the “Microsoft Store” and WSL command line to install Ubuntu will result in two separate installations, so it is best to stick with one or the other. Going forward, I will use the WSL command line exclusively.
Some Useful Tips
Running the Ubuntu app will open an instance in the Ubuntu user’s home directory “/home/your_username”. Running “wsl.exe -d Ubuntu” or the “bash” command under Windows PowerShell or “Command Prompt” will launch an Ubuntu instance in the current Windows directory (for example, “/mnt/c/Users/your_username”).
If Ubuntu needs to be rebooted, you can do the following in the Windows PowerShell:
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu Running 2
# Shutdown the Ubuntu instance
PS C:\WINDOWS\system32> wsl --shutdown
# Double-check the status
PS C:\WINDOWS\system32> wsl -l -v
NAME STATE VERSION
* Ubuntu Stopped 2
# Start again by running the Ubuntu app
To get access to your Ubuntu user’s home directory from Windows, in the Ubuntu terminal, run “explorer.exe .” to open up the current folder location under File Explorer. In my case, File Explorer opens up the “\\wsl.localhost\Ubuntu\home\your_username” directory.
Supposedly, opening “\\wsl$” in File Explorer should also work, but it takes me to Network shares where I see an Ubuntu folder. Opening that folder puts me into “\\wsl.localhost\Ubuntu” which is the root directory.
Some information above referenced from:
