Ubuntu更新软件源
<div><div class="article">
<div class="show-content" data-note-content="">
<div class="show-content-free">
<p>以Ubuntu18.04为例:</p>
<h4>1. 备份原有软件源文件</h4>
<div class="cnblogs_code">
<pre>cp /etc/apt/sources.list /etc/apt/sources.list.bak_yyyymmdd</pre>
</div>
<p> </p>
<h4>2. 打开sources.list文件,在文件末尾增加如下软件源地址</h4>
<pre class="hljs cpp"><code class="cpp">vi /etc/apt/sources.<span class="hljs-built_in">list
</span></code></pre>
<p>追加如下地址:</p>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">#添加阿里源
deb http:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse</span></pre>
</div>
<p> </p>
<h4>3. 更新系统软件源</h4>
<p>执行命令,更新系统软件源地址</p>
<pre class="hljs undefined"><code>apt-get update
apt-get upgrade
</code></pre>
<h4>4. 其他软件源</h4>
<div class="cnblogs_code">
<pre><span style="color: rgba(0, 0, 0, 1)">中科大源
##中科大源
deb https:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</span>
<span style="color: rgba(0, 0, 0, 1)">
163源
##163源
deb http:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse</span>
deb http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-security main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-proposed main restricted universe multiverse</span>
deb-src http:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.163.com/ubuntu/ bionic-backports main restricted universe multiverse</span>
<span style="color: rgba(0, 0, 0, 1)">
清华源
##清华源
deb https:</span><span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse</span>
deb https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</span>
deb-src https:<span style="color: rgba(0, 128, 0, 1)">//</span><span style="color: rgba(0, 128, 0, 1)">mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse</span></pre>
</div>
<p> </p>
</div>
</div>
</div>
<div id="free-reward-panel" class="support-author"> </div>
</div>
<p> </p>
</div>
<div id="MySignature" role="contentinfo">
<div name="dashmain" id="dash-main-id-878695" class="dash-main-2 878695-9.9"></div>
<div class="div_masklayer" id="div_masklayer"></div>
<div class="div_popup" id="Div_popup"> <img class="img_zfb" id="img_zfb" src="https://files.cnblogs.com/files/dadonggg/WechatIMG364.bmp" width="160" height="160">
<br>您的资助是我最大的动力!
<br>金额随意,欢迎来赏!<p></p>
</div>
<div class="autograph">
<p> <span style="display: none"> <strong>如果,您认为阅读这篇博客让您有些收获,不妨点击一下右下角的</strong>【<strong>推荐</strong>】按钮。<br>
</span> 如果,您希望更容易地发现我的新博客,不妨点击一下【<strong>关注我</strong>】。
</p>
<div class="blogds">如果,想给予我更多的鼓励,<span class="bold">求打赏!</span></div>
<p>因为,我的写作热情也离不开您的肯定支持,感谢您的阅读,我是【<strong>dadong</strong>】!</p>
</div><br><br>
来源:https://www.cnblogs.com/dadonggg/p/11129973.html
頁:
[1]