直接上代码
# 修复报找不到Locale: en_US.UTF8的问题
sudo sed -i "s/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/g" -i /etc/locale.gen
sudo locale-gen en_US.UTF-8
sudo update-locale en_US.UTF-8
# 更换国内镜像
# Check https://mirrors.tuna.tsinghua.edu.cn/help/raspbian/
echo "Debian Version: $(cat /etc/debian_version)"
sudo cp /etc/apt/sources.list.d/raspi.list /etc/apt/sources.list.d/raspi.list.bak
echo -e 'deb https://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ bullseye main non-free contrib rpi' | sudo tee /etc/apt/sources.list.d/raspi.list
# 拉取镜像包
sudo apt-get update
# 更新/安装常用包
# sudo apt-get purge vim-common
sudo apt install vim vim-common jq htop
# 禁用vim鼠标VISUAL模式
echo 'set mouse=' | sudo tee -a /etc/vim/vimrc
echo 'set ttymouse=' | sudo tee -a /etc/vim/vimrc
# 安装Docker
curl -fsSL get.docker.com -o get-docker.sh
sudo sh get-docker.sh --mirror Aliyun #请耐心等待
# 添加国内Docker镜像源
echo '{"registry-mirrors":["https://registry.docker-cn.com","http://hub-mirror.c.163.com"]}' | jq . | sudo tee /etc/docker/daemon.json
# Docker服务自启
sudo systemctl enable docker
sudo systemctl start docker
# docker命令免sudo
sudo user mod -aG docker $USER
# ...待补充
网友评论