ubuntu19.10源配置
一:版本代号介绍:
Ubuntu中,每个版本都有一个更为特色的名字,这个名字由一个形容词和一个动物名称组成,并且,形容词和名词的首字母都是一致的。
Ubuntu 发布版本的官方名称是 Ubuntu X.YY ,其中 X 表示年份(减去2000),YY 表示发布的月份。
我的当前ubuntu版本:
(base) ubuntu@ubuntu:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 19.10
Release: 19.10
Codename: eoan
划重点:eoan就是我的系统版本19.10的别名,如果你需要自己编辑更新列表文件, /etc/apt/sources. ,你就会发现在 url 的后面紧跟着一个 codename 。
二:修改自己的apt-get源为国内源
-
1:备份源
sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup
-
2:把阿里源复制进去并修改
我的19.10的版本代号是eoan,所以下图标红的要和你的版本代号一致。
-
我的配置如下:
sudo vim /etc/apt/sources.list # 阿里云源 deb http://mirrors.aliyun.com/ubuntu/ eoan main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ eoan-security main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ eoan-updates main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ eoan-backports main restricted universe multiverse ##测试版源 deb http://mirrors.aliyun.com/ubuntu/ eoan-proposed main restricted universe multiverse # 源码 deb-src http://mirrors.aliyun.com/ubuntu/ eoan main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ eoan-security main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ eoan-updates main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ eoan-backports main restricted universe multiverse ##测试版源 deb-src http://mirrors.aliyun.com/ubuntu/ eoan-proposed main restricted universe multiverse # 清华大学源 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse ##测试版源 deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse # 源码 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan main restricted universe multiverse deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-security main restricted universe multiverse deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-updates main restricted universe multiverse deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-backports main restricted universe multiverse ##测试版源 deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu/ eoan-proposed main restricted universe multiverse
-
3:更新软件列表和升级
sudo apt-get update sudo apt-get upgrade