debian升级到testing – 让debian系统永远保持最新的秘诀

作者: 杨圣亮 分类: Linux技巧 发布时间: 2017-01-02 08:08:21

debian的版本分为:unstable(不稳定版)、testing(测试版)、stable(稳定版),稳定版稳定性非常强悍,曾经使用过ubuntu,几乎每个星期都要重装系统,自从使用了debian系统,再不用重装系统了。然而稳定版的软件是比较旧的,为了追求稳定,牺牲了一些新的特性支持,比如:最新的debian 8.6 stable版本,linux内核还在3.16版本上,要知道,截止到2016-12-26号,Linux kernel已经更新到4.10了,稳定版是4.9

linux-kernel-4.9.png

整整后延了几代了。尤其是当Linux之父每次更新内核发布的通知都会鼓吹,新版Linux kernel加入了对某某的支持、加了某些特性,对于追新的桌面用户,早已眼馋的要死。好在debian也不武断,在追求稳定,发布稳定版的同时,也为喜新的用户发布了测试版。它介于不稳定版和稳定版之间,顺便提一下,我就是从稳定版追过来的,用了挺长的时间了,没发现不稳定,因此,推荐使用。unstable不推荐使用,毕竟是不稳定版,万一出了点什么,也不好解决。测试版是在不稳定版本的基本上建立起来了,相对稳定很多。

方法一:添加debian testing版本源

如果安装的是debian stable版,只要喜欢,任何时间都可以将其变成 testing版本,方法很简单,用喜欢的编辑器打开:/etc/apt/source.list 源文件,用#号注释掉之前的源,加入下面的源文件,该源长期有效,因为每个debian版本,都会有testing版本。

# --------testing  源
deb http://security.debian.org/ testing/updates main contrib
deb-src http://security.debian.org/ testing/updates main contrib
deb-src http://ftp.debian.org/debian/ testing-updates main contrib
deb http://ftp.debian.org/debian/ testing-updates main contrib
# 163
deb http://mirrors.163.com/debian/ testing main non-free contrib
deb http://mirrors.163.com/debian/ testing-updates main non-free contrib
deb-src http://mirrors.163.com/debian/ testing main non-free contrib
deb-src http://mirrors.163.com/debian/ testing-updates main non-free contrib
deb http://mirrors.163.com/debian-security/ testing/updates main non-free contrib
deb-src http://mirrors.163.com/debian-security/ testing/updates main non-free contrib

#中国官方源镜像
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/updates main contrib non-free
deb-src http://mirrors.ustc.edu.cn/debian-security/ testing/updates main contrib non-free

保存源文件,终端下执行:

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

系统就开始更新了,等待的时间可能会有点长,取决于网络速度。升级完成后,发现一切都变了,内核从3.16变成4.8了,当然,不止内核,一切都变了,隔一两个星期再执行以上的命令,就会发现,你的debian系统永远是最新的。

方法二:直接使用testing镜像安装

下载debian testing版本ISO镜像,刻盘或制作U盘启动工具,就可以安装testing了,推荐使用这种方式进行testing,不需要设置。直接安装就是testing了。

DVD镜像下载地址:http://cdimage.debian.org/cdimage/weekly-builds/amd64/iso-dvd/

友情提示:尽管debian testing依然稳定,但是系统从稳定版升级到测试版后,有些软件的依赖会发生变化,可能会导致一些软件无法使用,当然了,这些还是可以解决的,只是有点麻烦,如果不担心这一条,就大胆地升级吧,我是不怕的,你呢?

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注

6  ×    =  12

微信