由于原先的软件源的速度慢,所以就需要换源配置,让软件源下载得更快。
一、由于配置国内源风险太大,所以我们首先要采取备份文件:
sudo cp /etc/apt/sources.list sources_backup.list
界面如下:
二、查看文件(发现备份的文件sources_backup.list在目录里面)
ls -l
界面如下:
三、国内源:(这是国内源,可以在百度上直接寻找其他的,清空原有的文件,复制下面的文件并且保存退出)
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
四、输入下面的三条命令的其中的一个,清除里面的文件,同时将上面的国内源复制下来,保存退出。
sudo gedit /etc/apt/sources.list
或者:sudo vim /etc/apt/sources.list
或者:sudo nano /etc/apt/sources.list
界面如下: