获取“源列表”
修改Ubuntu源列表操作
查看Ubuntu
sudo lsb_release -a
返回结果 我的版本是12.04
No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 12.04.5 LTS Release: 12.04 //版本信息 Codename: precise
然后找对应版本的源列表
备份源列表
sudo cp /etc/apt/sources.list /etc/apt/sources.list_bak
编辑源列表
sudo vim /etc/apt/sources.list
vim编辑 - 删除全部内容
:%d
杭州的可以将以下内容复制到vim编辑框中,请他的可以去源列表中找离自己附近的源
deb http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ precise main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ precise-proposed main restricted universe multiverse deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse
vim编辑 - 保存并关闭文件
:wq
更新源
sudo apt-get update
Ubuntu修改apt-get镜像地址提高下载速度
最新推荐文章于 2024-08-21 09:15:07 发布