Ubuntu 20.04 && Ubuntu 18.04 修改 apt 源

目录
查看linux系统发行版本信息
ubuntu 20.04
ubuntu 18.04
部分ubuntu系统LTS版本代号
修改sources.list文件
ubuntu 20.04
ubuntu 18.04
更新
查看linux系统发行版本信息
ubuntu 20.04
$ lsb_release -a
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
1
2
3
4
5
可以看到发行版本代号为 focal

ubuntu 18.04
$ lsb_release -c
Codename: bionic
1
2
可以看到发行版本代号为 bionic

部分ubuntu系统LTS版本代号
Ubuntu 16.04代号为:xenial

Ubuntu 17.04代号为:zesty

Ubuntu 18.04代号为:bionic

Ubuntu 19.04代号为:disco

Ubuntu 20.04代号为:focal

修改sources.list文件
$ sudo vim /etc/apt/sources.list
1
ubuntu 20.04
#阿里源
deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ focal-proposed main restricted universe multiverse
1
2
3
4
5
6
7
8
9
10
11
ubuntu 18.04
#阿里源
deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
1
2
3
4
5
6
7
8
9
10
11
更新
$ sudo apt-get update
$ sudo apt-get upgrade

Share