20 ubuntu 中科大源_ubuntu20.04 LTS 更换国内163源、阿里源、清华源、中科大源
时间: 2023-06-30 09:23:26 浏览: 1563
您好!感谢您的提问。针对您的问题,以下是更换 Ubuntu 20.04 LTS 的软件源为中科大源的步骤:
1.备份原有的软件源列表文件
在终端(Terminal)中输入以下命令备份软件源列表文件:
```
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
```
2.修改软件源列表文件
在终端中输入以下命令编辑软件源列表文件:
```
sudo gedit /etc/apt/sources.list
```
将打开的文件中的内容全部替换为以下内容:
```
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# 额外的软件源
deb https://mirrors.ustc.edu.cn/ubuntu/ focal main universe restricted multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main universe restricted multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main universe restricted multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-security main universe restricted multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main universe restricted multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal main universe restricted multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-updates main universe restricted multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-backports main universe restricted multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-security main universe restricted multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ focal-proposed main universe restricted multiverse
```
保存并关闭文件。
3.更新软件源
在终端中输入以下命令更新软件源:
```
sudo apt-get update
```
4.更新已安装的软件包
在终端中输入以下命令更新已安装的软件包:
```
sudo apt-get upgrade
```
到此,您已成功更换 Ubuntu 20.04 LTS 的软件源为中科大源。希望对您有所帮助!
阅读全文
相关推荐
![-](https://img-home.csdnimg.cn/images/20241231045021.png)
![-](https://img-home.csdnimg.cn/images/20241231045053.png)
![-](https://img-home.csdnimg.cn/images/20241231045021.png)
![pdf](https://img-home.csdnimg.cn/images/20241231044930.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![txt](https://img-home.csdnimg.cn/images/20241231045021.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)
![](https://csdnimg.cn/download_wenku/file_type_ask_c1.png)