DEV Community

Cover image for Upgrade Debian 11 (bullseye) to Debian 12 (bookworm) in wsl2
hardyweb
hardyweb

Posted on • Edited on

Upgrade Debian 11 (bullseye) to Debian 12 (bookworm) in wsl2

Aku nok pakai php 8.2, jadi kena upgrade bullseye ke bookworm. step untuk upgrade adalah sebagaimana di bawah:-

root@local:/# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 11 (bullseye)
Release:        11
Codename:       bullseye
Enter fullscreen mode Exit fullscreen mode
root@local:/# uname -a
Linux 5.15.90.1-microsoft-standard-WSL2 #1 SMP Fri Jan 27 02:56:13 UTC 2023 x86_64 GNU/Linux

Enter fullscreen mode Exit fullscreen mode
root@local:/# cat /etc/apt/source.list
Enter fullscreen mode Exit fullscreen mode
deb http://deb.debian.org/debian bullseye main
deb http://deb.debian.org/debian bullseye-updates main
deb http://security.debian.org/debian-security bullseye-security main
deb http://ftp.debian.org/debian bullseye-backports main
Enter fullscreen mode Exit fullscreen mode

Change source.list from bullseye to bookworm with vi/nano/pico

deb http://deb.debian.org/debian bookworm main
deb http://deb.debian.org/debian bookworm-updates main
deb http://security.debian.org/debian-security bookworm-security main
deb http://ftp.debian.org/debian bookworm-backports main
Enter fullscreen mode Exit fullscreen mode
root@local:/# apt update
Enter fullscreen mode Exit fullscreen mode
root@local:/# apt upgrade --without-new-pkgs
Enter fullscreen mode Exit fullscreen mode

Perform full-upgrade will replace php 8.1 to new php 8.2 ( if previous wsl2 installed with linux bullseye has php 8.1 )

root@local:/# apt full-upgrade
Enter fullscreen mode Exit fullscreen mode

After that, validate php version

root@local:/# php -v
PHP 8.2.10 (cli) (built: Sep  4 2023 08:11:43) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.10, Copyright (c) Zend Technologies
    with Zend OPcache v8.2.10, Copyright (c), by Zend Technologies
Enter fullscreen mode Exit fullscreen mode
root@local:/# lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 12 (bookworm)
Release:        12
Codename:       bookworm
Enter fullscreen mode Exit fullscreen mode

Photo by Kevin Horvat on Unsplash

Buy Me A Coffee

Top comments (0)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.