ubuntu anaconda更换国内源
时间: 2023-11-10 17:04:24 浏览: 121
Anaconda换国内源
3星 · 编辑精心推荐
可以通过以下步骤更换Ubuntu Anaconda的国内源:
1. 打开终端,进入Anaconda安装目录下的/etc目录:`cd /opt/anaconda/etc/`
2. 备份原始的Anaconda源配置文件:`sudo cp sources.list sources.list.bak`
3. 使用文本编辑器(如nano)打开源配置文件:`sudo nano sources.list`
4. 将文件中的所有内容替换为以下内容:
```
# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
# deb-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-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-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-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
```
5. 保存文件并退出文本编辑器。
6. 更新源列表:`sudo apt-get update`
阅读全文