李良军 發表於 2020-2-15 17:06:26

Ubuntu 12.04 更新源大全(国内)

<p>使用国外源太慢了,修改为国内源会快很多。这里就为大家分享一下修改方法,需要的朋友可以参考一下</p>
<p>1.sudo gedit /etc/apt/sources.list</p>
<p>编辑你的源列表,将原来的内容全部删除或者做一下备份</p>
<blockquote>
<p>sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup (备份当前的源列表)</p>
</blockquote>
<p>添加下面列表中最适合你的源(注意不要全部添加),选择一个最合适你的即可,复制到你的列表中,然后保存列表。 <br />
&nbsp;</p>
<p>2.sudo apt-get update 更新源列表信息</p>
<p>可以在运行&ldquo;sudo apt-get update &rdquo;时查看一下错误信息,把不能连接的源删除再重新运行&ldquo;sudo apt-get update &rdquo;。</p>
<p>3.sudo apt-get upgrade 升 级或者用ubuntu自带的更新管理器升级也可</p>
<p>Ubuntu 12.04 源列表: <br />
&nbsp;</p>
<p>163源( 首选 ):</p>
<blockquote>
<p>deb http://mirrors.163.com/ubuntu/ precise main restricted<br />
deb-src http://mirrors.163.com/ubuntu/ precise main restricted<br />
deb http://mirrors.163.com/ubuntu/ precise-updates main restricted<br />
deb-src http://mirrors.163.com/ubuntu/ precise-updates main restricted<br />
deb http://mirrors.163.com/ubuntu/ precise universe<br />
deb-src http://mirrors.163.com/ubuntu/ precise universe<br />
deb http://mirrors.163.com/ubuntu/ precise-updates universe<br />
deb-src http://mirrors.163.com/ubuntu/ precise-updates universe<br />
deb http://mirrors.163.com/ubuntu/ precise multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ precise multiverse<br />
deb http://mirrors.163.com/ubuntu/ precise-updates multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ precise-updates multiverse<br />
deb http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ precise-backports main restricted universe multiverse<br />
deb http://mirrors.163.com/ubuntu/ precise-security main restricted<br />
deb-src http://mirrors.163.com/ubuntu/ precise-security main restricted<br />
deb http://mirrors.163.com/ubuntu/ precise-security universe<br />
deb-src http://mirrors.163.com/ubuntu/ precise-security universe<br />
deb http://mirrors.163.com/ubuntu/ precise-security multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ precise-security multiverse<br />
deb http://extras.ubuntu.com/ubuntu precise main<br />
deb-src http://extras.ubuntu.com/ubuntu precise main</p>
</blockquote>
<p>sohu源:</p>
<blockquote>
<p>deb http://mirrors.sohu.com/ubuntu/ precise main restricted<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise main restricted<br />
deb http://mirrors.sohu.com/ubuntu/ precise-updates main restricted<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates main restricted<br />
deb http://mirrors.sohu.com/ubuntu/ precise universe<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise universe<br />
deb http://mirrors.sohu.com/ubuntu/ precise-updates universe<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates universe<br />
deb http://mirrors.sohu.com/ubuntu/ precise multiverse<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise multiverse<br />
deb http://mirrors.sohu.com/ubuntu/ precise-updates multiverse<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-updates multiverse<br />
deb http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-backports main restricted universe multiverse<br />
deb http://mirrors.sohu.com/ubuntu/ precise-security main restricted<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-security main restricted<br />
deb http://mirrors.sohu.com/ubuntu/ precise-security universe<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-security universe<br />
deb http://mirrors.sohu.com/ubuntu/ precise-security multiverse<br />
deb-src http://mirrors.sohu.com/ubuntu/ precise-security multiverse<br />
deb http://extras.ubuntu.com/ubuntu precise main<br />
deb-src http://extras.ubuntu.com/ubuntu precise main</p>
</blockquote>
<p>ubuntu.cn99.com源(推荐):</p>
<blockquote>
<p>deb http://ubuntu.cn99.com/ubuntu/ precise main restricted universe multiverse<br />
deb http://ubuntu.cn99.com/ubuntu/ precise-updates main restricted universe multiverse<br />
deb http://ubuntu.cn99.com/ubuntu/ precise-security main restricted universe multiverse<br />
deb http://ubuntu.cn99.com/ubuntu/ precise-backports main restricted universe multiverse<br />
deb http://ubuntu.cn99.com/ubuntu-cn/ precise main restricted universe multiverse</p>
</blockquote>
<p>教育网源</p>
<p>如果你是在校大学生,可以使用校园网/教育网,就是用教育网的资源吧,尤其是支持ipv6的,那更新速度就按兆算了。</p>
<p>电子科技大学:</p>
<blockquote>
<p>deb http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse<br />
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse<br />
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse<br />
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse<br />
deb http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse<br />
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise main restricted universe multiverse<br />
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse<br />
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse<br />
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-security main restricted universe multiverse<br />
deb-src http://ubuntu.uestc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse</p>
</blockquote>
<p>中国科技大学:</p>
<blockquote>
<p>deb http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse<br />
deb http://debian.ustc.edu.cn/ubuntu/ precise-backports restricted universe multiverse<br />
deb http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse<br />
deb http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse<br />
deb http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse<br />
deb-src http://debian.ustc.edu.cn/ubuntu/ precise main restricted universe multiverse<br />
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-backports main restricted universe multiverse<br />
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-proposed main restricted universe multiverse<br />
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-security main restricted universe multiverse<br />
deb-src http://debian.ustc.edu.cn/ubuntu/ precise-updates main restricted universe multiverse</p>
</blockquote>
<p>北京交大:</p>
<blockquote>
<p>deb http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe<br />
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe<br />
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe<br />
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe<br />
deb http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe<br />
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise main multiverse restricted universe<br />
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-backports main multiverse restricted universe<br />
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-proposed main multiverse restricted universe<br />
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-security main multiverse restricted universe<br />
deb-src http://mirror.bjtu.edu.cn/ubuntu/ precise-updates main multiverse restricted universe</p>
</blockquote>
<p>4、更新源(在终端里敲如下命令)</p>
<blockquote>
<p>sudo apt-get update</p>
</blockquote>
<p><strong>安装Ubuntu18.04后,使用国外源太慢了,修改为国内源会快很多。</strong></p>
<p>修改阿里源为Ubuntu 18.04默认的源</p>
<p>备份/etc/apt/sources.list<br />
#备份<br />
cp /etc/apt/sources.list /etc/apt/sources.list.bak</p>
<p>在/etc/apt/sources.list文件前面添加如下条目<br />
#添加阿里源</p>
<blockquote>
<p>deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse<br />
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse<br />
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse<br />
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse<br />
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse<br />
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse<br />
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse<br />
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse</p>
</blockquote>
<p>最后执行如下命令更新源<br />
##更新<br />
sudo apt-get update<br />
sudo apt-get upgrade</p>
<p>另外其他几个国内源如下:<br />
中科大源</p>
<blockquote>
<p>##中科大源<br />
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse<br />
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse<br />
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse<br />
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse<br />
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse<br />
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse<br />
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse<br />
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</p>
</blockquote>
<p>163源</p>
<blockquote>
<p>##163源<br />
deb http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse<br />
deb http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse<br />
deb http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse<br />
deb http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ bionic main restricted universe multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse<br />
deb-src http://mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse</p>
</blockquote>
<p>清华源</p>
<blockquote>
<p>##清华源<br />
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse<br />
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse<br />
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse<br />
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse<br />
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse<br />
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse<br />
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse<br />
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse<br />
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</p>
</blockquote>
<p>这篇文章就介绍到这了</p>
頁: [1]
查看完整版本: Ubuntu 12.04 更新源大全(国内)