Ubuntu16.04更换软件源

方法一、通过图形化界面跟换软件源

进入设置:点击software&updates


选择download from,点击展开,选择others


通过手动查找列表或者切换至推荐服务器



通过自动检测,将软件源切换到ustc

进入/etc/apt/sources.list查看软件源:

nano /etc/apt/sources.list

软件源已经切换到ustc

方法二、

检验软件源:

1.备份原始源文件sources.list

桌面打开终端,执行命令:sudo  cp 

/etc/apt/sources.list    /etc/apt/sources.list.bak

2.修改源文件sources.list

(1)终端执行命令:sudo 

 chmod   777   /etc/apt/sources.list更改文件权限使其可编辑;

(2)执行命令:sudo 

 nano   /etc/apt/sources.list打开文件进行编辑;

(3)删除原来的文件内容,复制下面的任意一个到其中并保存(常用的是阿里源和清华源,推荐阿里源,内容可以去博客复制);

阿里源:

debhttp://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse

debhttp://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universemultiverse

debhttp://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universemultiverse

debhttp://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universemultiverse

debhttp://mirrors.aliyun.com/ubuntu/ bionic-backports main restricteduniverse multiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/ bionic main restricted universemultiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universemultiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universemultiverse

deb-srchttp://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universemultiverse

deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backportsmain restricted universe multiverse

清华源:

debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricteduniverse multiverse

deb-srchttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricteduniverse multiverse

debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates mainrestricted universe multiverse

deb-srchttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates mainrestricted universe multiverse

debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports mainrestricted universe multiverse

deb-srchttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports mainrestricted universe multiverse

debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security mainrestricted universe multiverse

deb-srchttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security mainrestricted universe multiverse

debhttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed mainrestricted universe multiverse

deb-srchttps://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed mainrestricted universe multiverse

163源:

debhttp://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse

debhttp://mirrors.163.com/ubuntu/ bionic-security main restricted universemultiverse

deb http://mirrors.163.com/ubuntu/ bionic-updatesmain restricted universe multiverse

debhttp://mirrors.163.com/ubuntu/ bionic-proposed main restricted universemultiverse

debhttp://mirrors.163.com/ubuntu/ bionic-backports main restricted universemultiverse

deb-src http://mirrors.163.com/ubuntu/ bionicmain restricted universe multiverse

deb-srchttp://mirrors.163.com/ubuntu/ bionic-security main restricted universemultiverse

deb-srchttp://mirrors.163.com/ubuntu/ bionic-updates main restricted universemultiverse

deb-srchttp://mirrors.163.com/ubuntu/ bionic-proposed main restricted universemultiverse

deb-srchttp://mirrors.163.com/ubuntu/ bionic-backports main restricted universemultiverse

3.更新源

桌面终端执行命令:sudo apt update更新软件列表,换源完成。

你可能感兴趣的:(Ubuntu16.04更换软件源)