Windows subsystem WSL Ubuntu upgrade 18.04 to 20.04 issue

1.5k views Asked by At

For a windows subsystem WSL2,I upgraded a ubuntu 18.04 to ubuntu 20.08

The upgrade command

sudo do-release-upgrade

After the installation

lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 20.04.1 LTS
Release:        20.04
Codename:       focal

But at the windows command prompt

wsl -l -v
  NAME                   STATE           VERSION
* Ubuntu-18.04           Running         2
  docker-desktop         Running         2
  docker-desktop-data    Running         2

I expected wsl to recognize the upgrade from ubuntu 18 to 20

How do i correct wsl -l -v to reflect ubuntu 20.04

1

There are 1 answers

0
O Paetzold On BEST ANSWER

The name "Ubuntu-18.04" comes from the original distribution. It has nothing to do with the actual version of Ubuntu.

You could change the name by using

wsl --export Ubuntu-18.04 - | wsl --import Ubuntu-20.04 <yourWSLFolder> -
wsl --unregister Ubuntu-18.04

This exports and imports your distribution, renames it and deletes the original distribution.

(Answer is applying from How to Move a Windows 10 WSL 2 Linux Distribution to Another Location to just change the name)