2000字范文,分享全网优秀范文,学习好帮手!
2000字范文 > Ubuntu 如何更新软件源(阿里源 华为源 清华源等)

Ubuntu 如何更新软件源(阿里源 华为源 清华源等)

时间:2020-08-09 05:57:02

相关推荐

Ubuntu 如何更新软件源(阿里源 华为源 清华源等)

提示:文章写完后,目录可以自动生成,如何生成可参考右边的帮助文档

文章目录

前言一、Ubuntu 更新软件源的方法二、具体步骤

前言

Ubuntu系统自带的更新源服务器在国外,下载速度一般很慢,所以更换为国内源就成为必要操作了。

一、Ubuntu 更新软件源的方法

Ubuntu 更新软件源的方法:

1、打开终端;

2、输入命令备份原有软件源文件;

3、打开sources.list文件并添加新的软件源地址;

4、输入命令更新系统软件源地址。

二、具体步骤

具体步骤如下:

1、使用快捷键【ctrl+alt+t】打开终端。

2、输入以下命令备份原有软件源文件。

cp /etc/apt/sources.list /etc/apt/sources.list.bak_yyyymmdd

3、再输入以下命令打开sources.list文件并添加新的软件源地址。

vim /etc/apt/sources.list #打开sources.list文件

PS: 新安装的Ubuntu可能没有安装Vim, 用如下命令先安装Vim:

sudo apt-get install vim-gtk

在文件末尾添加新的软件源地址,常用国内源地址如下:

#阿里源地址

deb /ubuntu/ bionic main restricted universe multiverse

deb /ubuntu/ bionic-security main restricted universe multiverse

deb /ubuntu/ bionic-updates main restricted universe multiverse

deb /ubuntu/ bionic-proposed main restricted universe multiverse

deb /ubuntu/ bionic-backports main restricted universe multiverse

deb-src /ubuntu/ bionic main restricted universe multiverse

deb-src /ubuntu/ bionic-security main restricted universe multiverse

deb-src /ubuntu/ bionic-updates main restricted universe multiverse

deb-src /ubuntu/ bionic-proposed main restricted universe multiverse

deb-src /ubuntu/ bionic-backports main restricted universe multiverse

#华为源地址

deb /ubuntu/ focal main restricted

deb /ubuntu/ focal-updates main restricted

deb /ubuntu/ focal universe

deb /ubuntu/ focal-updates universe

deb /ubuntu/ focal-backports main restricted universe

deb /ubuntu/ focal-security main restricted

deb /ubuntu/ focal-security universe

#中科大源地址

deb https://mirrors./ubuntu/ bionic main restricted universe multiverse

deb-src https://mirrors./ubuntu/ bionic main restricted universe multiverse

deb https://mirrors./ubuntu/ bionic-updates main restricted universe multiverse

deb-src https://mirrors./ubuntu/ bionic-updates main restricted universe multiverse

deb https://mirrors./ubuntu/ bionic-backports main restricted universe multiverse

deb-src https://mirrors./ubuntu/ bionic-backports main restricted universe multiverse

deb https://mirrors./ubuntu/ bionic-security main restricted universe multiverse

deb-src https://mirrors./ubuntu/ bionic-security main restricted universe multiverse

deb https://mirrors./ubuntu/ bionic-proposed main restricted universe multiverse

deb-src https://mirrors./ubuntu/ bionic-proposed main restricted universe multiverse

#163源地址

deb /ubuntu/ bionic main restricted universe multiverse

deb /ubuntu/ bionic-security main restricted universe multiverse

deb /ubuntu/ bionic-updates main restricted universe multiverse

deb /ubuntu/ bionic-proposed main restricted universe multiverse

deb /ubuntu/ bionic-backports main restricted universe multiverse

deb-src /ubuntu/ bionic main restricted universe multiverse

deb-src /ubuntu/ bionic-security main restricted universe multiverse

deb-src /ubuntu/ bionic-updates main restricted universe multiverse

deb-src /ubuntu/ bionic-proposed main restricted universe multiverse

deb-src /ubuntu/ bionic-backports main restricted universe multiverse

#清华源地址

deb https://mirrors.tuna./ubuntu/ bionic main restricted universe multiverse

deb-src https://mirrors.tuna./ubuntu/ bionic main restricted universe multiverse

deb https://mirrors.tuna./ubuntu/ bionic-updates main restricted universe multiverse

deb-src https://mirrors.tuna./ubuntu/ bionic-updates main restricted universe multiverse

deb https://mirrors.tuna./ubuntu/ bionic-backports main restricted universe multiverse

deb-src https://mirrors.tuna./ubuntu/ bionic-backports main restricted universe ultiverse

deb https://mirrors.tuna./ubuntu/ bionic-security main restricted universe multiverse

deb-src https://mirrors.tuna./ubuntu/ bionic-security main restricted universe multiverse

deb https://mirrors.tuna./ubuntu/ bionic-proposed main restricted universe multiverse

deb-src https://mirrors.tuna./ubuntu/ bionic-proposed main restricted universe ultiverse

4、输入命令更新系统软件源地址:

apt-get update

apt-get upgrade

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。