1.查看系统版本号(官方语言系统代码)
lsb_release -c
得到本系统的系统代码
类似其他版本的
Ubuntu 12.04 (LTS)代号为precise。
Ubuntu 14.04 (LTS)代号为trusty。
Ubuntu 15.04 代号为vivid。
Ubuntu 15.10 代号为wily。
Ubuntu 16.04 (LTS)代号为xenial
这是一个阿里的是我的系统就应该要将上面的trusty改为bionic
2.首先找到配置文件,将系统配置文件备份
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
3.打开文件
使用vim和geidt都行
vi /etc/apt/sources.list
sudo gedit /etc/apt/sources.list
二者选其一
4.注释或者删除里面的文件内容(我自己选择的是删除比较快)然后将下面的这些复制进去保存
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
4.保存退出
如果用gedit打开就直接点击上面的保存
如果用vim打开就用 ESC :wq
5.更新源
sudo apt-get update
6.更新软件
sudo apt-get dist-upgrage
sudo apte-get upgrade