Ubuntu 18.04 修改默认源为国内源

1.备份/etc/apt/sources.list

#备份
cp /etc/apt/sources.list /etc/apt/sources.list.bak

2.在/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

3.最后执行如下命令更新源

##更新
sudo apt-get update
sudo apt-get upgrade

4.另外其他几个国内源如下:

中科大源

##中科大源
deb https://mirrors.ustc.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse

163源

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

清华源

##清华源
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ bionic main restricted universe multiverse
deb-src 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-src 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-src 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-src 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-proposed main restricted universe multiverse

 



原文地址:https://www.cnblogs.com/guanbin-529/p/11780096.html

时间: 2024-11-05 13:51:00

Ubuntu 18.04 修改默认源为国内源的相关文章

Ubuntu 18.04修改默认源为国内源

安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多. 修改阿里源为Ubuntu 18.04默认的源 备份/etc/apt/sources.list#备份cp /etc/apt/sources.list /etc/apt/sources.list.bak 在/etc/apt/sources.list文件前面添加如下条目#添加阿里源deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multi

Ubuntu 18.04修改默认源

安装Ubuntu 18.04后,使用国外源太慢了,修改为国内源会快很多. 修改阿里源为Ubuntu 18.04默认的源 备份/etc/apt/sources.list #备份 cp /etc/apt/sources.list /etc/apt/sources.list.bak 在/etc/apt/sources.list文件前面添加如下条目 #添加阿里源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe m

Ubuntu 18.04修改ip步骤

Ubuntu 18.04修改ip步骤: 注:配置/etc/network/interfaces已无用 vi /etc/netplan/50-cloud-init.yaml network:ethernets:eno1:addresses: [10.0.0.2/24]dhcp4: nogateway4: 10.0.0.1 :wq 注:1.":"后要有空格2.Ubuntu 18.04的网卡名已改为eno1.eno2.... 使配置生效(不需重启服务器): netplan apply 原文地

ubuntu 18.04 修改 固定ip

写在前面,问:为什么要固定ip.答:要知道固定IP的好处多多,随意搬动,固定共享地址,不怕断网等等 首先,我们要选取一个局域网内的IP,方法如下: 1.选取IP号段,一般是路由器DCHP以外的IP地址 比如:DCHP动态IP地址由192.168.1.11~255,那我们可以选取192.168.1.10(保证此IP没有被其他设备占用) 2.路由器内设置要固定的IP地址和Mac码,其中Mac码可以找一个正在用的IP下分配好的来用,然后起个名字记录下来 第二步,(Ctrl+Alt+T)打开命令行,if

Ubuntu 18.04 更换apt源

1.备份apt源 cp /etc/apt/sources.list /etc/apt/sources.list.bak 2.修改apt源 sudo gedit /etc/apt/sources.list 3.删除所有,添加阿里源 #添加阿里源 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb http://mirrors.aliyun.com/ubuntu/ bionic-se

Ubuntu 18.04 更换阿里源

1.备份 sudo cp /etc/apt/source.list /etc/apa/source.list.bak 2.编辑 sudo vim /etc/apt/source.list 3.修改内容 deb http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted uni

Ubuntu 18.04 修改swap分区大小

1.查看初始状态 查看原先swap大小 [email protected]:~# free -h 总计 已用 空闲 共享 缓冲/缓存 可用 内存: 62G 417M 38G 3.0M 23G 61G 交换: 2.0G 0B 2.0G [email protected]:~# 原先swap文件位置 [email protected]:~# swapon -s 文件名 类型 大小 已用 权限 /swapfile1 file 12582908 0 -2 [email protected]:~# 2.创

[转]CentOS 修改yum源为国内源

http://blog.csdn.net/pkueecser/article/details/8836973 重要:存放路径  cd /etc/yum.repos.d 首先备份CentOS-Base.repo mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/CentOS-Base.repo.backup 法一:直接下载源文件 CentOS USTC mirror 这个镜像不错,大家更新可用这个 #yum -y install wget

备忘 ubuntu 18.04 下安装 tensorflow GPU 版本

转自:https://www.cnblogs.com/hutao722/p/9342577.html tensorflow目前已经升级至r1.9版本.在之前的深度学习中,我是在MAC的虚拟机上跑CPU版本的tensorflow程序,当数据量变大后,tensorflow跑的非常慢,在内存不足情况下,又容易造成系统崩溃(虚拟机走的是windows7). 配置信息 为了后续的深度学习,不得已,我在京东买了一部组装厂商提供的主机,是网吧特供机.配置如下: CPU i5 8400 6核 16G内存 GPU