先将当前版本更新到最新
apt update -y && apt full-upgrade -y
安装常用工具
apt install -y curl wget sudo
创建更新源目录与文件
sudo mkdir -p /etc/apt/sources.list.d/
sudo touch /etc/apt/sources.list.d/example.list
sudo sed -i ‘s/bullseye/bookworm/g’ /etc/apt/sources.list
sudo sed -i ‘s/bullseye/bookworm/g’ /etc/apt/sources.list.d/example.list
apt update -y && apt full-upgrade -y
清除老系统残留
apt autoremove -y && apt autoclean -y
重启 SSH端口回归默认22
reboot
一键清理垃圾
sudo apt autoremove –purge -y
sudo apt clean -y
sudo apt autoclean -y
sudo apt remove –purge $(dpkg -l | awk ‘/^rc/ {print $2}’) -y
sudo journalctl –rotate
sudo journalctl –vacuum-time=1s
sudo journalctl –vacuum-size=50M
sudo apt remove –purge $(dpkg -l | awk ‘/^ii linux-(image|headers)-[^ ]+/{print $2}’ | grep -v $(uname -r | sed ‘s/-.*//’) | xargs) -y
查看Debian版本
cat /etc/debian_version
查看Linux内核版本 牛啊 最新的6.1
uname -r
查看当前系统中Linux内核版本列表
dpkg –list | grep linux-image
删除AMD的旧内核
sudo apt remove linux-image-5.10.0-21-amd64
sudo apt remove linux-image-5.10.0-21-cloud-amd64
2023-10-30 13:11:25
进行了更新,某些文章内容具有时效性,若失效或有错误,请在下方留言。
暂无评论内容