我们下载一些软件资料什么的都是需要从一些站点去下载的,Linux *** 作系统的源可以理解为资料下载的服务器对你提供的地址。
下载或者软件更新的时候是要从指定源站点去下载或者更新的。
为什么要给Linux换源?(没有人规定非要换源)
换源的大部分原因是Linux系统自带的官方源是国外源,也就是我们需要访问国外的服务器来更新包,访问速度是非常慢的,而且失败的概率很大。使用中科大、阿里、网易等源速度飞快。
换源的步骤如下:
1.首先找到源的配置文件
cd /etc/apt
2.对配置文件进行备份
cp sources.list sources.list.bak
3.修改源配置文件(sources.list)
国内源在哪里:直接百度即可找到
# 中科大 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 # 阿里源 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
vi sources.list
复制粘贴即可然后保存即可。
更新软件列表:sudo apt-get update
进行软件更新:sudo apt-get upgrade
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)