龙空技术网

Ubuntu18.04 更换国内源

西柚乐ciyol 514

前言:

现时我们对“ubuntu源搭建”都比较关心,同学们都需要知道一些“ubuntu源搭建”的相关知识。那么小编也在网络上搜集了一些关于“ubuntu源搭建””的相关资讯,希望大家能喜欢,咱们快快来了解一下吧!

简介

Ubuntu系统自带的源都是国外的网址,国内用户在使用的时候网速比较慢。一个软件的下载是十分痛苦的,这里讲解一下如何将国外源更换为国内源,让你的网速Biu.Biu.Biu

操作方法

1、备份原来的源

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

2、使用 vim 编辑源

sudo vim /etc/apt/sources.list

3、更换为阿里的源(Ubuntu18.04)

deb  bionic main restricted universe multiversedeb-src  bionic main restricted universe multiverse deb  bionic-security main restricted universe multiversedeb-src  bionic-security main restricted universe multiverse deb  bionic-updates main restricted universe multiversedeb-src  bionic-updates main restricted universe multiverse deb  bionic-proposed main restricted universe multiversedeb-src  bionic-proposed main restricted universe multiverse deb  bionic-backports main restricted universe multiversedeb-src  bionic-backports main restricted universe multiverse 

4、更新源

sudo apt-get update

5、复损坏的软件包,尝试卸载出错的包,重新安装正确版本的

sudo apt-get -f install

6、更新软件

sudo apt-get upgrade

7、附上其他源

7.1、清华大学

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释deb  bionic main restricted universe multiverse# deb-src  bionic main restricted universe multiversedeb  bionic-updates main restricted universe multiverse# deb-src  bionic-updates main restricted universe multiversedeb  bionic-backports main restricted universe multiverse# deb-src  bionic-backports main restricted universe multiversedeb  bionic-security main restricted universe multiverse# deb-src  bionic-security main restricted universe multiverse # 预发布软件源,不建议启用# deb  bionic-proposed main restricted universe multiverse# deb-src  bionic-proposed main restricted universe multiverse 

7.2、网易

deb  wily main restricted universe multiversedeb  wily-security main restricted universe multiversedeb  wily-updates main restricted universe multiversedeb  wily-proposed main restricted universe multiversedeb  wily-backports main restricted universe multiversedeb-src  wily main restricted universe multiversedeb-src  wily-security main restricted universe multiversedeb-src  wily-updates main restricted universe multiversedeb-src  wily-proposed main restricted universe multiversedeb-src  wily-backports main restricted universe multiverse

标签: #ubuntu源搭建