上个月刚把 ThinkPad X240 从 Debian 9 升级到 11,前两天就在公司拿到了新的笔记本 —— ThinkPad X13 Gen 2;当然也就直接安装 Debian 11 了,索性更新一版,之前记录过当初安装 Debian 9 之后的一些操作

先解决 WiFi 相关的一个小 bug (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

配置 apt 源为国内的镜像站 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

添加自己到 sudo3

$ su -
$ adduser youfeng sudo
# or
# usermod -aG sudo youfeng (debian-based)
# usermod -aG wheel youfeng (redhat-based)
# 退出再登录使加组生效

# 让 `sudo` 组成员不用密码执行命令 
$ vi /etc/sudoers
%sudo ALL=(ALL:ALL) NOPASSWD:ALL
:wq!

安装 Intelligent Pinyin

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

安装我自己需用到的软件包

$ 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
# 查看手动安装的软件包列表
# apt-mark showmanual

安装 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

安装 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

安装 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

安装 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

安装 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

移除我不需要的软件包

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