Ubuntu20.04更换国内源

打印 上一主题 下一主题

主题 560|帖子 560|积分 1680

备份源文件
  1. sudo cp -v /etc/apt/sources.list /etc/apt/sources.list.backup
复制代码
执行chmod命令更改文件权限
  1. sudo chmod 777 /etc/apt/sources.list
复制代码
通过gedit命令编辑软件源
  1. sudo gedit /etc/apt/sources.list
复制代码
执行上面命令后如果报sudo: gedit: command not found的错误,执行下面命令
  1. sudo apt install vim vim /etc/apt/sources.list
复制代码
阿里云国内源
  1. deb http://mirrors.aliyun.com/ubuntu/ focal main restricted universe multiverse
  2. deb http://mirrors.aliyun.com/ubuntu/ focal-updates main restricted universe multiverse
  3. deb http://mirrors.aliyun.com/ubuntu/ focal-backports main restricted universe multiverse
  4. deb http://mirrors.aliyun.com/ubuntu/ focal-security main restricted universe multiverse
复制代码
换完源之后执行以下命令
  1. sudo apt update
  2. sudo apt upgrade
复制代码
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
回复

使用道具 举报

0 个回复

倒序浏览

快速回复

您需要登录后才可以回帖 登录 or 立即注册

本版积分规则

反转基因福娃

金牌会员
这个人很懒什么都没写!

标签云

快速回复 返回顶部 返回列表