apt-get源
--------------------
用途:
设置软件源,用于快速安装软件。
--------------------
图形化界面
1、桌面右上角,点击设置,选择“system-settings”
2、选择download&Updates
3、在Ubuntu选项卡中,在download from中选择other,找到china中的aliyun。选择之后点确定即可。
--------------------
命令行页面
1、编辑源参数
cd /etc/apt/ && sudo cp sources.list sources.list.bak
sudo vim sources.list
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# 源码
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
##测试版源
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
# Canonical 合作伙伴和附加
deb http://archive.canonical.com/ubuntu/ xenial partner
deb http://extras.ubuntu.com/ubuntu/ xenial main
2、更新资源
sudo apt-get update
补充:
1、如果按照某软件过程中,,出现一直报“0%正在等待报头”的错误。
1)选择国内源,比如阿里源
2)要把原来的源信息删除,重新安装。
cd /var/cache/apt && sudo rm -rf archives