ubuntu在更新前,最好先设置国内源,不然可能会更新很慢,或者无法更新,推荐使用阿里云源。设置方法如下:
- 备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
- 修改
sudo vim /etc/apt/sources.list
将source.list文件内容替换成下面的
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
开始更新
(1)打开终端:Alt+Ctrl+T
(2)更新资源
sudo apt update
(3)对软件升级
sudo apt upgrade
(4)接着安装系统更新,如果不希望升级系统版本,完成这步就可以了。
sudo apt dist-upgrade
升级系统版本
(1)安装上面的更新后重新启动一次系统
sudo reboot
(2)检测是否有ubuntu新版本
sudo apt update
sudo update-manager -c -d
(3)如果出现还有软件需要升级,全部选择,接着“立即安装”,然后“确定”
(4)接着我们可以再次使用update-manager进行检测,弹出窗口点击“升级”,就可以一步步完成系统的升级了。
本文参考
(1)https://blog.csdn.net/jdsnpgxj/article/details/107610391
(2)https://developer.aliyun.com/article/704603