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

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

Top comments (0)

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

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Discover a treasure trove of wisdom within this insightful piece, highly respected in the nurturing DEV Community enviroment. Developers, whether novice or expert, are encouraged to participate and add to our shared knowledge basin.

A simple "thank you" can illuminate someone's day. Express your appreciation in the comments section!

On DEV, sharing ideas smoothens our journey and strengthens our community ties. Learn something useful? Offering a quick thanks to the author is deeply appreciated.

Okay