I just upgraded the ThinkPad X240 from Debian 9 to 11 last month, and a few days later I got a new laptop at work - ThinkPad X13 Gen 2. So I performed a clean install of Dedian 11 directly on the new one, and made this post by the way. There was a previous post documenting what I did after installing Debian 9 .

Make WiFi work first (kernal 5.10 with AX210) 1

$ uname -r
5.10.0-13-amd64

$ sudo dmesg | grep AX210
[5.877522] iwlwifi 0000:09:00.0: Detected Intel(R) Wi-Fi 6 AX210 160MHz, REV=0x420

$ sudo dmesg | grep iwlwifi

$ mv /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm /lib/firmware/iwlwifi-ty-a0-gf-a0.pnvm.bak
$ reboot

Configure the apt source as a domestic mirror site 2

$ su -
$ echo "deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
deb https://mirrors.tuna.tsinghua.edu.cn/debian-security/ bullseye-security main contrib non-free" > /etc/apt/sources.list

Add myself to the sudo group 3

$ su -
$ adduser youfeng sudo
# or
# usermod -aG sudo youfeng (debian-based)
# usermod -aG wheel youfeng (redhat-based)
# Log out and then log back in again for the new group to take effect.

# Allow sudo group members to execute commands without password.
$ vi /etc/sudoers
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
:wq!

Install Intelligent Pinyin

$ sudo apt install ibus-libpinyin
$ ibus restart
$ ibus engine libpinyin

Install the packages I need

$ sudo apt install aria2 chromium dnsutils ffmpeg gdebi gimp git gthumb hugo inkscape jpegoptim jq mpv optipng rdesktop remmina shadowsocks-libev vlc wget youtube-dl -y
# Print the list of manually installed packages
# apt-mark showmanual

Install Nutstore 4

$ aria2c https://www.jianguoyun.com/static/exe/installer/debian/nautilus_nutstore_amd64.deb -d ~/Downloads/
$ sudo gdebi ~/Downloads/nautilus_nutstore_amd64.deb -y

Install Sublime Text 5

$ wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
$ echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
$ sudo apt-get update
$ sudo apt-get install sublime-text

Install VS Code 6

$ wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > packages.microsoft.gpg
$ sudo install -o root -g root -m 644 packages.microsoft.gpg /etc/apt/trusted.gpg.d/
$ sudo sh -c 'echo "deb [arch=amd64,arm64,armhf signed-by=/etc/apt/trusted.gpg.d/packages.microsoft.gpg] https://packages.microsoft.com/repos/code stable main" > /etc/apt/sources.list.d/vscode.list'
$ rm -f packages.microsoft.gpg
$ sudo apt update
$ sudo apt install code

Install VSCodium 7

$ wget -qO - https://gitlab.com/paulcarroty/vscodium-deb-rpm-repo/raw/master/pub.gpg \
    | gpg --dearmor \
    | sudo dd of=/usr/share/keyrings/vscodium-archive-keyring.gpg
$ echo 'deb [ signed-by=/usr/share/keyrings/vscodium-archive-keyring.gpg ] https://download.vscodium.com/debs vscodium main' \
    | sudo tee /etc/apt/sources.list.d/vscodium.list
$ sudo apt update
$ sudo apt install codium

Install Syncthing 8

$ sudo curl -s -o /usr/share/keyrings/syncthing-archive-keyring.gpg https://syncthing.net/release-key.gpg
$ echo "deb [signed-by=/usr/share/keyrings/syncthing-archive-keyring.gpg] https://apt.syncthing.net/ syncthing stable" | sudo tee /etc/apt/sources.list.d/syncthing.list
$ sudo apt update
$ sudo apt install syncthing

Remove the packages I don’t need

$ sudo apt remove anthy fcitx* mozc* uim* mlterm* xiterm+thai xterm* -y
$ sudo apt autoremove -y