Ubuntu Software Repository¶
Architecture¶
AMD64 (x86_64), Intel x86
Versions¶
All versions supported by Canonical Inc. See https://wiki.ubuntu.com/Releases .
Usage¶
警告
Backup /etc/apt/sources.list
before editing it.
Edit /etc/apt/sources.list
, replace http://archive.ubuntu.com/
with https://mirrors.nwafu.edu.cn
.
You can use this command to do that:
sudo sed -i 's/archive.ubuntu.com/mirrors.nwafu.edu.cn/g' /etc/apt/sources.list
小技巧
Sometimes, your default mirror may be http://<country-code>.archive.ubuntu.com/
instead of http://archive.ubuntu.com/`, such as ``http://cn.archive.ubuntu.com/
.
Now, you need to use this command:
sudo sed -i 's/cn.archive.ubuntu.com/mirrors.nwafu.edu.cn/g' /etc/apt/sources.list
。
This is the /etc/apt/sources.list
file of Ubuntu 18.04 LTS.
# Source code repository are commented by default.
deb https://mirrors.nwafu.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-src https://mirrors.nwafu.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.nwafu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
# deb-src https://mirrors.nwafu.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.nwafu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
# deb-src https://mirrors.nwafu.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.nwafu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# deb-src https://mirrors.nwafu.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
# Pre-release, not suggested
# deb https://mirrors.nwafu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
# deb-src https://mirrors.nwafu.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
After editing sources.list
, run sudo apt-get update
to apply changes.
小技巧
We highly recommend you to use HTTPS to access mirror.
See also¶
- Ubuntu Official Website
- Ubuntu docs
- Ubuntu Wiki
- Ubuntu Mailing List
https://community.ubuntu.com/contribute/support/mailinglists/
- AskUbuntu
- Ubuntu Forum