Ubuntu20.04的源文件在/etc/apt/sources.list文件中。如果你需要更换
Ubuntu20.04的源,可以按照以下步骤
进行操作:
1.备份原始的sources.list文件,以免操作失误后无法恢复。
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
2.编辑sources.list文件,将其中的源地址修改为你所需要的地址,例如将默认的源修改为阿里源。
sudo vim /etc/apt/sources.list
将原来的内容修改为:
deb http://mirrors.aliyun.com/
ubuntu/ focal main restricted universe multiverse
deb http://mirrors.aliyun.com/
ubuntu/ focal-security main restricted universe multiverse
deb http://mirrors.aliyun.com/
ubuntu/ focal-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/
ubuntu/ focal-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/
ubuntu/ focal-backports main restricted universe multiverse
3.更新源列表。
sudo apt-get update
更新完成后,你可以使用apt-get等命令
进行软件包管理了。
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
如需转载请保留出处:https://bianchenghao.cn/bian-cheng-ri-ji/54493.html