1. 修改apt源

修改apt源为http版本


# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

# deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

 

deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

# deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

 

deb http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

# deb-src http://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

 

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

并且安装


apt -y install apt-transport-https ca-certificates

修改为https源


# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm main contrib non-free non-free-firmware

 

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-updates main contrib non-free non-free-firmware

 

deb https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

# deb-src https://mirrors.tuna.tsinghua.edu.cn/debian/ bookworm-backports main contrib non-free non-free-firmware

 

deb https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

# deb-src https://security.debian.org/debian-security bookworm-security main contrib non-free non-free-firmware

2.修改时区

设置中国时间


timedatectl set-timezone Asia/Shanghai

3.The system will suspend now! 禁止掉debian默认休眠

systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target



4.增加中文支持

apt -y install locales

 

sudo dpkg-reconfigure locales



5.增加sudo权限

sudo usermod -aG sudo xingpeng

 

 

 systemctl reboot

输入后重启即可


6.去掉关闭盖子的影响

sudo vim /etc/systemd/logind.conf

 



7.安装docker

for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done

# Add Docker's official GPG key:

sudo apt-get update

sudo apt-get install ca-certificates curl gnupg

sudo install -m 0755 -d /etc/apt/keyrings

curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg

sudo chmod a+r /etc/apt/keyrings/docker.gpg

 

# Add the repository to Apt sources:

echo \

  "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \

  "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \

  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

更换docker到国内源


sudo vim /etc/docker/daemon.json

{

        "registry-mirrors":[

                "https://mirror.ccs.tencentyun.com",

                "https://registry.docker-cn.com",

                "https://hub-mirror.c.163.com",

                "https://docker.mirrors.ustc.edu.cn"

        ]

}

sudo systemctl daemon-reload

 

sudo systemctl restart docker

 

sudo docker info

8.拼音输入法安装,可以参考官网

sudo apt  -y install --install-recommends fcitx5 fcitx5-chinese-addons

 

sudo apt -y install  gnome-shell-extension-kimpanel

 

sudo im-config