最快方法——替換法
剛安裝好的ubutun,打開source.list后,用vim替換的方法將所有的us提付出替換為
cn,然后保存退出,更新即可。
# vim /etc/apt/source.list
# 在vim的界面輸入 %s/us/cn/g,保存退出
# apt-get update
%s/us/cn/g, g是全局的意思。%s是替換。
ps vim的常用指令還有哪些? vim編程要做哪些配置?
修改軟件源為本地鏡像源
把 /etc/apt/source.list中的內容替換為阿里雲的源。
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse