Update and Upgrade WSL Linux Distro in Windows 10

The ability to run Linux natively in Windows 10 is provided by the WSL feature. Windows 10 does not automatically update or upgrade the packages in a distro installed in WSL. This is a task that a WSL Linux user need to perform himself.

WSL stands for Windows Subsystem for Linux, which initially, was limited to Ubuntu only. Modern versions of WSL allow installing and running multiple Linux distros from Microsoft Store.

Linux Distros Microsoft Store Windows 10

After enabling WSL, you can install various Linux versions from the Store. You can use the following links:

  1. Ubuntu
  2. openSUSE Leap
  3. SUSE Linux Enterprise Server
  4. Kali Linux for WSL
  5. Debian GNU/Linux

and more.

Most distros ship with an empty/minimal package catalog. It is strongly recommended that you regularly update your package catalog, and upgrade your installed packages in all WSL Linux distros you use.

To keep your WSL Linux distro up-to-date, you should use your distro's preferred package manager. Here's how it can be done.

To Update and Upgrade WSL Linux Distro in Windows 10,

  1. Run your WSL Linux distro under the required user account.
  2. For Debian, Ubuntu, and Kali Linux issue the following command: sudo apt update && sudo apt upgrade.Windows 10 WSL Upgrade AptWindows 10 WSL Upgrade Progress
  3. If the package manager shows a prompt 'Do you want to continue', type y and hit the Enter key to continue.Windows 10 WSL Upgrade Progress 2Windows 10 WSL Upgrade Progress 3
  4. In OpenSUSE Leap and SUSE Linux Enterprise Server, run the command sudo zypper refresh to update the package list.
  5. To install available updates, issue the command sudo zypper update. You can combine it with the command above to get the following one line snippet: sudo zypper refresh && sudo zypper update.

Note: Running a command with sudo will make Linux prompt you to provide your password. When prompted, type your Linux password for the current Linux username  you have set for the current WSL Linux distro, and hit the Enter key.

That's it.

Related articles:

Leave a Reply

Your email address will not be published. Required fields are marked *