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

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