Ubuntu configures domestic sources
Ubuntu源
Each Ubuntu release has its own set of four official repositories:
Main
– Free and open source software supported by Canonicalsecurity
– Ubuntu used to refer to security updatesupdates
– Non-security updatesproposed-updates
– Pre-update, small beta version-----not recommended to be enabledbackports
– Backup update, used to update functions of some old versions of software-----generally not enabledUniverse
– Community-maintained free and open source softwareRestricted
– Proprietary drivers for the devicemultiverse
– Software restricted by copyright or legal issues, like Debiannon-free
, is non-free software, that is, commercial software.
Reference:
https://www.cnblogs.com/pengdonglin137/p/3342654.html
Using the configuration generator
HKUST source configuration generator
https://mirrors.ustc.edu.cn/repogen/
Install dependency packages
# 如果访问https源需要apt-transport-https支持
apt install apt-transport-https -y
Open apt source configuration file
vim /etc/apt/sources.list
Domestic apt source
Reference: https://mirrors.ustc.edu.cn/help/ubuntu.html
If you want to use it 其他版本
, just focal
replace it with 其他版本代号
:
22.04
:jammy
;20.04
:focal
;18.04
:bionic
;16.04
:xenial
;14.04
:trusty
。
Dayuan of Science and Technology of China
## 中科大源
# main
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
# security安全更新
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# updates非安全更新
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# proposed预更新,小 beta 版-----不建议启用
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# backports后备更新,用来对某些老版本软件进行功能更新-----一般不启用
#deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# universe社区维护的自由软件--https国内访问不了
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse
Aliyuan
# main
deb https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
# security安全更新
deb https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
# updates非安全更新
deb https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
# proposed预更新,小 beta 版-----不建议启用
#deb https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
#deb-src https://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
# backports后备更新,用来对某些老版本软件进行功能更新-----一般不启用
#deb https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#deb-src https://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
# universe社区维护的自由软件--https国内访问不了
deb http://archive.ubuntu.com/ubuntu/ trusty main universe restricted multiverse