1. 换源
一、查看ubuntu的Codename
lsb_release -a | grep Codename | awk '{print $2}' # 输出结果为下文中的Codename
二、备份系统源
cd /etc/apt
sudo mv sources.list sources.list.bak
三、写入阿里云的源
sudo gedit sources.list
下面源信息中$Codename为第一步中系统的Codename,用记事本批量替换即可。
deb http://mirrors.aliyun.com/ubuntu/ $Codename main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-backports main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-proposed main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-security main multiverse restricted universe deb http://mirrors.aliyun.com/ubuntu/ $Codename-updates main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-backports main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-proposed main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-security main multiverse restricted universe deb-src http://mirrors.aliyun.com/ubuntu/ $Codename-updates main multiverse restricted universe
四、执行更新
执行以下命令,完成更新。
sudo apt-get update
sudo apt-get upgrade
2. 安装
1. 安装基本开发工具
git clone https://e.coding.net/weidongshan/DevelopmentEnvConf.git cd DevelopmentEnvConf sudo ./Configuring_ubuntu.sh
标签:mirrors,restricted,配置,ubuntu,Codename,main,multiverse
From: https://www.cnblogs.com/ymfqq-blog/p/18086271