精神科李主任 發表於 2019-8-25 15:44:00

Ubuntu 更换下载源

<h2>Ubuntu将下载官方源更换为国内源</h2>
<p>由于某些原因,在国内更新软件都很慢,可以改源为国内源</p>
<h2>1、备份原始文件</h2>
<div class="cnblogs_code">
<pre>sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup</pre>
</div>
<h2>2、打开文件</h2>
<div class="cnblogs_code">
<pre>vi /etc/apt/sources.list</pre>
</div>
<h2>3、注释原文件内容添加新地址</h2>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">#阿里云
deb http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ trusty-backports main restricted universe multiverse</span></pre>
</div>
<p>或者网易云</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">#网易163
deb http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-security main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-updates main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb-src http://mirrors.163.com/ubuntu/ trusty-backports main restricted universe multiverse</span></pre>
</div>
<p>或者清华源</p>
<p>https://mirrors.tuna.tsinghua.edu.cn/help/ubuntu/</p>
<h2>4、保存退出</h2>
<p>ESC&nbsp; +&nbsp; :&nbsp; +&nbsp; wq</p>
<h2>5、更新源</h2>
<div class="cnblogs_code">
<pre>sudo apt-get update</pre>
</div>
<h2>6、更新软件</h2>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">sudo apt-get dist-upgrade
sudo apt-get upgrade</span></pre>
</div>
<p>&nbsp;</p>

</div>
<div id="MySignature" role="contentinfo">
    <div>作者:梦里梦外</div>
<div>出处:https://www.cnblogs.com/mengw/
</div>
<p>--------------------------------------------------------------------------------------------------------------------</p>
<p>个性签名:以梦为马,驰骋岁月;以梦为马,诗酒趁年华!</p>
<p>如果觉得这篇文章对你有小小的帮助的话,记得在右下角点个<span> “推荐” </span>哦,博主在此感谢!</p>
<p></p><br><br>
来源:https://www.cnblogs.com/mengw/p/11408118.html
頁: [1]
查看完整版本: Ubuntu 更换下载源