Loading

Debian9 升级至 Debian10

前言

目前国内云服务商提供的镜像最新只有 9 , 本文讲解升级至 10 的方法

正文

查看当前版本#

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux 9.0 (stretch)
Release:        9.0
Codename:       stretch

现在的版本是9.0

更新到当前版本的最新版#

apt-get update
apt-get upgrade
apt-get dist-upgrade

过程中如有提醒让选择方式

 install the package maintainer's version
 keep the local version currently installed
 show the differences between the versions

我们选择第一个

修改apt源为10#

sed -i 's/stretch/buster/g' /etc/apt/sources.list

strech 为 debian9 代号, 将其替换为 buster 为 debian10 代号

更新apt索引#

apt-get update

升级到debian10#

apt-get upgrade
apt-get dist-upgrade

出现选项选择 yes

出现多个选项选择 选项一

重启#

重启系统

reboot

验证版本

lsb_release -a

清理老版本软件#

apt-get autoremove

其他

更新到testing#

testing版本为测试版本, 他的 apt 仓库是更新的, 一般也很稳定了

需要注意,为了减少问题出现,务必先更新到当前最新稳定版再更新testing

sed -i 's/buster/testing/g' /etc/apt/sources.list

然后执行 apt-get update

如果出现 404 代表你配置的镜像源没有此镜像, 国内推荐 USTC

vim /etc/apt/sources.list

将原有内容去除,添加为

deb http://mirrors.ustc.edu.cn/debian/ testing main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ testing main contrib non-free
deb http://mirrors.ustc.edu.cn/debian/ testing-updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian/ testing-updates main contrib non-free
deb http://mirrors.ustc.edu.cn/debian-security/ testing-security main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian-security/ testing-security main contrib non-free

执行

apt-get update
apt-get upgrade
apt-get dist-upgrade

重启

reboot

查看版本

lsb_release -a

No LSB modules are available.
Distributor ID: Debian
Description:    Debian GNU/Linux bullseye/sid
Release:        testing
Codename:       bullseye

清理老的软件

apt-get autoremove

作者:chnmig

出处:https://www.cnblogs.com/chnmig/p/12661605.html

版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。

posted @   ChnMig  阅读(3317)  评论(0)    收藏  举报
编辑推荐:
· 使用 libdivide 加速整数除法运算
· 为什么互联网这么卷?
· .NET 10 Preview 4中 ASP.NET Core 改进
· 记一次 ASP.NET CORE 线上内存溢出问题与 dotnet-dump 的排查方法
· 为 Java 虚拟机分配堆内存大于机器物理内存会怎么样?
阅读排行:
· 聊一聊 微软的裁员计划对技术团队的冲击
· 7 款让人“上头”的开源小游戏
· 520表白神器
· 重磅消息,微软宣布 VS Code Copilot 开源,剑指 Cursor!
· 红杉AI闭门会:AI 不再卖工具,而是卖收益
点击右上角即可分享
微信分享提示
more_horiz
keyboard_arrow_up dark_mode palette
选择主题
menu