ubuntu18.04如何更新软件源
ubuntu18.04更新软件源的方法:1、打开终端;2、输入命令备份原有软件源文件;3、打开sources.list文件并添加新的软件源地址;4、输入命令更新系统软件源地址即可。
具体操作方法如下:
使用快捷键【ctrl+alt+t】打开终端。
输入以下命令备份原有软件源文件。
cp /etc/apt/sources.list /etc/apt/sources.list.bak_yyyymmdd
再输入以下命令打开sources.list文件并添加新的软件源地址。
vi /etc/apt/sources.list #打开sources.list文件
在文件末尾添加新的软件源地址,相关地址如下
#阿里源地址
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-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
#中科大源地址
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
#163源地址
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-class="lazy" data-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse
#清华源地址
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-class="lazy" data-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
最后输入命令更新系统软件源地址即可。
apt-get update
apt-get upgrade
免责声明:
① 本站未注明“稿件来源”的信息均来自网络整理。其文字、图片和音视频稿件的所属权归原作者所有。本站收集整理出于非商业性的教育和科研之目的,并不意味着本站赞同其观点或证实其内容的真实性。仅作为临时的测试数据,供内部测试之用。本站并未授权任何人以任何方式主动获取本站任何信息。
② 本站未注明“稿件来源”的临时测试数据将在测试完成后最终做删除处理。有问题或投稿请发送至: 邮箱/279061341@qq.com QQ/279061341