Ubuntu18.04更新国内源

1.修改 sources.list 文件(需要超级权限):

若一次安装 Ubuntu 还没更新 vim,建议使用 gedit 修改

sudo gedit /etc/apt/sources.list

vim:

sudo vim /etc/apt/sources.list

注意:建议备份一下源文件,以防出错

2.阿里源:

更改源文件为以下内容:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse

(或其他的源)

3.更新源:

sudo apt-get update

猜你喜欢

转载自blog.csdn.net/lcx1837/article/details/108557745
今日推荐