Initialize the environment after Debian minimal installation

Modify apt source


mv /etc/apt/source.list /etc/apt/source.list.bak
vi /etc/apt/source.list

Take the source of USTC as an example, copy and paste it into source.list


# 默认注释了源码仓库,如有需要可自行取消注释
deb http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm main contrib non-free non-free-firmware
deb http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm-updates main contrib non-free non-free-firmware

# backports 软件源,请按需启用
# deb http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware
# deb-src http://mirrors.ustc.edu.cn/debian bookworm-backports main contrib non-free non-free-firmware

Perform a software update


apt update
apt upgrade -y

Install base software


apt install sudo curl wget git vim -y

Base setting

Add yourself to group sudo


usermod -aG sudo [your account]

Change Console font size


sudo dpkg-reconfigure console-setup

Font for the console choose Terminus

Font size choose 16x32 (For high-resolution screens, you can try multiple times to find the right size).

V2ray installation

Download V2ray core precomplied compressed package from Github release.

V2ray core release page

We decided to use v2rayA manage V2ray core, so let's download it's .deb installer package (depends on your OS) from Github Release page.

v2rayA release page

Modify timezone


dpkg-reconfigure tzdata

Install fonts

I choose to install JetBrainsMono Nerd Font and Fira Code Nerd Font.

Download those fonts from Nerd Font Github release page.

Nerd Font release page

Then create fonts folder at home.


mkdir -p ~/.loca/share/fonts

Unzip those Font conpressed packages to fonts folder.


unzip JetBrainsMono.zip -d ~/.local/share/fonts/JetBrainsMono
unzip FiraCode.zip -d ~/.local/share/fonts/FiraCode

Refresh font cache


fc-cache -fv

If Console output prompt "command not found", you should pre-install package fontconfig with the next command:


sudo apt install fontconfig -y

Change OS default editor


sudo update-alternative --install /usr/bin/editor editor /usr/local/bin/nvim 50
sudo update-alternative --config editor

Choose the editor you want to be the default editor.

You can also change vi pointing to nvim.


sudo update-alternative --install /usr/bin/vi vi /usr/local/bin/nvim 60
sudo update-alternative --config vi

The following operation are the same as above.