ubuntu16 换源笔记

. 给ubuntu 换源,ubuntu 的默认的资源地址是国外的服务器,更新升级都会很卡,所以先换源。

cd /etc/apt      # 切换到 apt目录下
sudo mv sources.list  sources.list.bak  # 将当前的源备份
sudo vi sources.list   #写一个新的文件

输入以下内容    按   i  开始输入    保存退出时 wq 

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-proposed main restricted universe multiverse

deb http://mirrors.aliyun.com/ubuntu/ xenial-backports 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-proposed main restricted universe multiverse

deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse

ubuntu16 换源笔记_第1张图片

这样就可以使用国内的阿里云的镜像了

sudo apt update # 更新软件列表
sudo apt upgrade  #将本地已经安装的软件跟列表对比 更新

 

 

你可能感兴趣的:(嵌入式linux学习)