编辑/etc/apt/sources.list文件, 在文件最前面(加在前面可以使得优先级高于后台的官方地址)添加以下条目
aliyun镜像:http://mirrors.aliyun.com/ubuntu/
163镜像:http://mirrors.163.com/ubuntu/
搜狐镜像:http://mirrors.sohu.com/ubuntu/
配置文件每一行为一项,每项有几段,几个段组合成一个最终地址
第3段为版本号代码或trusty等,还分别可以带后缀-updates、-backports、-proposed、-security ,组合成wily-updates,trusty-security等等
第4段以后分别为最后地址的第4段,可以为 main restricted universe multiverse
合并为的实际地址形如:http://mirrors.aliyun.com/ubuntu/dists/trusty/main 或 http://mirrors.aliyun.com/ubuntu/dists/trusty-updates/universe
其它:
you want in one command and not use Software source ticking then in terminal put:
sudo add-apt-repository universe
On older versions of Ubuntu, you might have to use a full source line:
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) universe"
To enable all Ubuntu software (main universe restricted multiverse) repositories use
sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu $(lsb_release -sc) main universe restricted multiverse"
you can add also partner repository with different link (see difference is ubuntu to canonical)
sudo add-apt-repository "deb http://archive.canonical.com/ubuntu $(lsb_release -sc) partner"
Then update the package list:
sudo apt-get update