show lsb-release before upgrade

1
2
3
4
5
6
cat  /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.4 LTS"

prepare

open file with command is as follows:

1
sudo nano /etc/update-manager/release-upgrades

set Prompt=lts is as follows:

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Default behavior for the release upgrader.

[DEFAULT]
# Default prompting and upgrade behavior, valid options:
#
#  never  - Never check for, or allow upgrading to, a new release.
#  normal - Check to see if a new release is available.  If more than one new
#           release is found, the release upgrader will attempt to upgrade to
#           the supported release that immediately succeeds the
#           currently-running release.
#  lts    - Check to see if a new LTS release is available.  The upgrader
#           will attempt to upgrade to the first LTS release available after
#           the currently-running one.  Note that if this option is used and
#           the currently-running release is not itself an LTS release the
#           upgrader will assume prompt was meant to be normal.
Prompt=lts

CTRL+S to save, then CTRL+X to exit.

upgrade

1
2
3
4
5
sudo apt update

sudo apt upgrade -y

sudo do-release-upgrade

show lsb-release after upgrade

1
2
3
4
5
6
cat  /etc/lsb-release

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04 LTS"
1
2
uname -a
Linux TX 5.15.146.1-microsoft-standard-WSL2 #1 SMP Thu Jan 11 04:09:03 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
1
2
cat /proc/version
Linux version 5.15.153.1-microsoft-standard-WSL2 (root@941d701f84f1) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Fri Mar 29 23:14:13 UTC 2024
1
2
 sudo dmesg | grep "Linux version"
[    0.000000] Linux version 5.15.153.1-microsoft-standard-WSL2 (root@941d701f84f1) (gcc (GCC) 11.2.0, GNU ld (GNU Binutils) 2.37) #1 SMP Fri Mar 29 23:14:13 UTC 2024
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
hostnamectl
 Static hostname: TX
       Icon name: computer-container
         Chassis: container ☐
      Machine ID: 185bf0b7091146ea8c39b2e32991d39e
         Boot ID: e8de24fe41ef41a197982dd3d33bfc3c
  Virtualization: wsl
Operating System: Ubuntu 24.04 LTS
          Kernel: Linux 5.15.153.1-microsoft-standard-WSL2
    Architecture: x86-64

The kernel is not upgraded for conservative reasons. For the specific kernel upgrade, please refer to here.

problems

/dev/null: Permission denied

problem description is as follows:

1
2
3
/home/ia/.pyenv/bin/pyenv: line 23: /dev/null: Permission denied
/home/ia/.pyenv/libexec/pyenv-hooks: line 24: /dev/null: Permission denied
/home/ia/.pyenv/plugins/pyenv-virtualenv/bin/pyenv-sh-activate: line 78: /dev/null: Permission denied

solution:

1
sudo chmod 666 /dev/null