System Configuration
sudo raspi-config
apt replaces domestic sources.
Edit /etc/apt/sources.list and add it at the beginning.
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-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye main contrib non-free
# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bullseye-updates main contrib non-free
Edit /etc/apt/sources.list.d/raspi.list and add at the beginning
deb http://mirrors.tuna.tsinghua.edu.cn/raspberrypi/ bullseye main
Solve the problem of VI being unable to backspace and causing confusion
sudo apt remove vim-common; sudo apt install vim git curl
Customize vim configuration file
vi ~/.vimrc, set the content according to your own preferences:
set tabstop=4
set nu
Install Samba
sudo apt install samba samba-common
Add at the end of /etc/samba/smb.conf:
[homes]
comment = Homes
browseable = yes
writable = yes
Add samba user:
sudo smbpasswd -a pi
sudo service smbd restart
Support remote desktop connection
sudo apt install xrdp
After logging in with Windows Remote Desktop Connection, you may get a gray screen. Just add a new user and log in with the new user.
Install C++ documentation and basic tools
sudo apt install libstdc++-10-doc
sudo apt install build-essential cmake git pkg-config curl
Modify python source
mkdir ~/.pip; cd ~/.pip; touch pip.conf
vim pip.conf
Add the following content to pip.conf
[global]
index-url=https://pypi.tuna.tsinghua.edu.cn/simple
timeout = 6000
[install]
trusted-host=pypi.tuna.tsinghua.edu.cn
disable-pip-version-check = true