Upgrade Ubuntu 22.04 to Ubuntu 22.04 | Windows Subsystem for Linux (WSL2)

preview_player
Показать описание
This video is going to be about how to upgrade the Ubuntu version from 20.04 LTS to 22.04 LTS on the Ubuntu which is installed as a Windows Subsystem for Linux or WSL in the Windows 11 operating system.

Launch Ubuntu on Windows 11 by pressing the Windows key and typing ubuntu on the search box.

Next, check the current version of Ubuntu with cat /etc/os-release. Here, we can see the current version is 20.04.4 LTS and the version name is Focal Fossa. To upgrade the version, let’s first update and upgrade the apt packages to the latest version. You will be prompted for the currently logged-on user’s password for the first time. Enter the password. If you don’t remember the password, please refer to my video on how to reset the Ubuntu WSL user’s password. The link is also put in the description below. Since apt is going to update and upgrade lots of packages, it may take some time

After the update & upgrade is complete, let’s verify if any package is left for upgrading by typing sudo apt dist-upgrade. Basically, apt upgrade and apt dist-upgrade are the same and are used to upgrade the packages that are already installed on the system.

As the next step of upgrading the Ubuntu version, you should already have the update-manager-core installed on the system. If it’s not installed, you can install it by typing the sudo apt install update-manager-core. It’s already installed on my system.

After that, type nano /etc/update-manager/release-upgrades, to open the release-upgrades file and check if Prompt=lts is uncommented or not. If it’s commented, you should uncomment by removing the ‘hash symbol’ in front of it. Then press ‘ctrl+O’, press enter and press ‘ctrl-x’ to exit the file.

Finally, run sudo do-release-upgrade -d and hit enter. This will upgrade the current version of the Linux distribution to one-step higher. The upgrading process is now begun. It takes some time to complete, so I am fast-forwarding the video.

Now, the system upgrade is complete. Just hit enter to continue. Now, press x to close or r to resurrect the window. I press the ‘r’ key.

Before wrapping up the video, let’s verify the current version with cat /etc/os-release. We can see the current version is 22.04.1 LTS and the version number is Jammy Jellyfish.
Рекомендации по теме
Комментарии
Автор

You've helped me a lot with this video :D

condoritolentinorubenalexi
Автор

I have this problem, after command sudo do-release-upgrade -d
Traceback (most recent call last):
File "/usr/bin/do-release-upgrade", line 11, in <module>
from import MetaReleaseCore
File "/usr/lib/python3/dist-packages/UpdateManager/Core/MetaRelease.py", line 25, in <module>
import apt
File "/usr/lib/python3/dist-packages/apt/__init__.py", line 23, in <module>
import apt_pkg
ModuleNotFoundError: No module named 'apt_pkg'
I don't know how its resolve, can you help me?

nikitaefremov