Ubuntu18.04更换国内源

打开/etc/apt/sources.list

vi /etc/apt/sources.list

将原有的数据注释掉,换上国内镜像

阿里云源

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

清华源

deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

中科大源

deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-updates main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-backports main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-security main restricted universe multiverse
deb-src https://mirrors.ustc.edu.cn/ubuntu/ bionic-proposed main restricted universe multiverse

更改完成之后执行以下命令

apt update
apt upgrade

  

原文地址:https://www.cnblogs.com/gentlemanwuyu/p/11621636.html

时间: 2024-10-06 22:29:41

Ubuntu18.04更换国内源的相关文章

win10 linux Ubuntu 18.04更换国内源

安装了win10的linux bash 版本为ubuntu 18.04 首先查询自己的linux版本信息 cat /etc/issue   然后对系统的镜像源文件进行备份,再修改镜像源文件/etc/apt/sources.list sudo cp /etc/apt/sources.list /etc/apt/sources.list_b 在镜像源文件的最前面添加国内镜像源地址即可 中科大镜像 deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main

7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装 扩展 1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm # 7.6  yum更换国内源 ![mark](http://oqxf7c508.bkt.clouddn.com/blog/20170812/154757717.png?imagesl

yum更换国内源、下载rpm包,源码包安装

yum更换国内源 yum本身自带的yum是国外的地址,国内下载会比较慢. 配置163yum源 rm -f dvd.repo  删除之前默认的yum源 使用wget或curl命令后,生产新的yum源文件CentOS7-Base-163.repo 查看CentOS7-Base-163.repo 下载rpm包 安装扩展epel,yum install -y epel-release安装epel包,目录下生成epel.repo和epel-testing.repo文件. yum list 查看rpm包(y

5周第2次课 yum更换国内源 yum下载rpm包 源码包安装

1. yum 更换国内源 系统内置的源很多时候都是官方的,大部分在国外,使用起来不是很快,也很难下载,这时候最好使用国内的源,如163 1.1 删除系统中自带的 yum源配置文件 mv CentOS-Base.repo CentOS-Base.repo.bak 1.2 下载网易 yum 源的配置文件 wget http://mirrors.163.com/.help/CentOS7-Base-163.repo 或者curl -O http://mirrors.163.com/.help/Cent

7.6 yum更换国内源;7.7 yum下载rpm包;7.8 -7.9 源码包安装

扩展: 1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm 7.6 yum更换国内源 1. 进入/etc/yum.repos.d目录下: [[email protected] ~]# cd /etc/yum.repos.d 2. 删除本地仓库配置文件:rm -f 仓库配置文件 [[email protected] yum.

五周第二次课(1月9日) 7.6 yum更换国内源 7.7 yum下载rpm包 7.8/7.9 源码包安装

五周第二次课(1月9日)7.6 yum更换国内源7.7 yum下载rpm包7.8/7.9 源码包安装扩展1. 配置yum源优先级 http://ask.apelearn.com/question/7168 2. 把源码包打包成rpm包 http://www.linuxidc.com/Linux/2012-09/70096.htm 命令::================================================================================

yum更换国内源、yum下载rpm包和源码包安装

一.yum更换国内源 1.先进入目录:cd /etc/yum.repos.d/ 2.删除对应的repo文件或重命名它:rm -f dvd.repo 或 mv dvd.repo dvd.repo.bak (删除前确认一下wget命令有没有安装,如果没有先用命令安装再删除:yum install -y wget) [[email protected] yum.repos.d]# mv dvd.repo dvd.repo.bak 3.再用命令下载对应的repo源:wget http://mirrors

yum搭建本地仓库、更换国内源、下载rpm包

1.yum搭建本地仓库 有时候yum不能使用,因为Linux没有办法联网.默认的yum仓库是需要远程连接资源的,连接网站的,从网站里面下载rpm安装包,然后再安装.如果不能联网,yum是否就不能使用了呢?也不是的,我们可以搭建一个本地的yum仓库,在本地的路径里面找rpm安装包.操作这些步骤的前提,首先需要一个光驱.光盘或是镜像文件,挂载到 /mnt/ 下.下面可能会删除一些文件,删除之前先做一个备份,见下图, 输入 vi dvd.repo ,回车,进入编辑, 接下来清除缓存,见下图, 用 yu

yum更换国内源

yum更换国内源首先我们把自己原先的源删除掉,或者备份后删除也可以然后我们把yum的核心文件删除后,需要在网上下载一个,比如说用163的#wget http://mirrors.163.com/.help/CentOS7-Base-163.repo就会出现一个新的Base文件或者#curl -O http://mirrors.163.com/.help/CentOS7-Base-163.repo然后再yum list 就能看到包了上面链接是centos7使用的163yum源 原文地址:http: