Ubuntu16.04更新源(加速下载)

一 备份原来ubuntu的下载源文件1 cd etc apt 2 ls 3 cp sources list sources list bak 4 gedi

一.备份原来ubuntu的下载源文件

1 cd /etc/apt
2 ls
3 cp sources.list sources.list .bak
4 gedit sources.list 
5 vim sources.list 

二.替换阿里云源

 1 deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse  
 2 deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse  
 3 deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse  
 4 deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
 5 ##测试版源  
 6 deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse  
 7 # 源码  
 8 deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse  
 9 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse  
10 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse  
11 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse  
12 ##测试版源  
13 deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse  
14 # Canonical 合作伙伴和附加  
15 deb http://archive.canonical.com/ubuntu/ xenial partner  
16 deb http://extras.ubuntu.com/ubuntu/ xenial main 

三.更新源和软件

1 sudo apt-get update 更新源  
2 sudo apt-get upgrade 更新软件 

https://yq.aliyun.com/articles/704603 

更新源

https://blog.csdn.net/Lagrantaylor/article/details/100096444

解决依赖问题

 

 

 

ubuntu安装相关命令

sudo apt-get update  更新源
sudo apt-get install package 安装包
sudo apt-get remove package 删除包
sudo apt-cache search package 搜索软件包
sudo apt-cache show package  获取包的相关信息,如说明、大小、版本等
sudo apt-get install package --reinstall  重新安装包
sudo apt-get -f install  修复安装
sudo apt-get remove package --purge 删除包,包括配置文件等
sudo apt-get build-dep package 安装相关的编译环境
sudo apt-get upgrade 更新已安装的包
sudo apt-get dist-upgrade 升级系统
sudo apt-cache depends package 了解使用该包依赖那些包
sudo apt-cache rdepends package 查看该包被哪些包依赖
sudo apt-get source package  下载该包的源代码
sudo apt-get clean && sudo apt-get autoclean 清理无用的包
sudo apt-get check 检查是否有损坏的依赖