码迷,mamicode.com
首页 > 系统相关 > 详细

Ubuntu18.04修改apt-get源

时间:2020-04-26 11:21:03      阅读:78      评论:0      收藏:0      [点我收藏+]

标签:源文件   ISE   ase   bak   http   更新   cat   lsb   ionic   

1)备份源文件:

sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak

2)查看版本信息
如是Linux Mint等Ubuntu衍生版,执行:

cat /etc/upstream-release/lsb-release

如是Ubuntu直接执行:

lsb_release -c

确认当前系统代号(Codename)为:bionic。如是其他版本,请使用其他版本的软件源,其中:

Ubuntu 12.04 (LTS)代号为precise。
Ubuntu 14.04 (LTS)代号为trusty。
Ubuntu 15.04 代号为vivid。
Ubuntu 15.10 代号为wily。
Ubuntu 16.04 (LTS)代号为xenial。

3)修改sources.list:
修改/etc/apt/sources.list为以下内容:

deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse

4)检查更新

sudo apt-get update

Ubuntu18.04修改apt-get源

标签:源文件   ISE   ase   bak   http   更新   cat   lsb   ionic   

原文地址:https://www.cnblogs.com/testopsfeng/p/12777392.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!