在Ubuntu的利用过程中,软件源的设置对体系的更新速度跟牢固性有侧重要影响。本文将具体介绍怎样轻松进级Ubuntu软件源,帮助用户告别旧版本,享用更快的更新休会。
软件源(Repository)是存储软件包信息的客栈,Ubuntu经由过程设置源来获取软件包,停止体系更新、安装新软件等操纵。默许情况下,Ubuntu利用官方源,但可能会因为收集原因招致更新速度慢、不牢固。
在调换源之前,起首检查以后的源设置:
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
sudo nano /etc/apt/sources.list
在打开的文件中,假如源设置是默许的,则无需调换。
以下是一些常用的国内源:
以清华大年夜学源为例,调换本来的源设置:
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
保存并封闭文件,更新源列表:
sudo apt update
在Ubuntu中,你还可能经由过程图形界面调换源。在软件与更新中,抉择“软件源”,然后点击“其他软件源”按钮,增加你抉择的国内源。
实现软件源的调换后,可能利用以下命令更新软件跟体系:
sudo apt upgrade
sudo apt dist-upgrade
经由过程以上步调,你可能轻松进级Ubuntu软件源,告别旧版本,享用更快的更新休会。在调换源时,请抉择坚固的国内源,以确保体系的牢固性跟保险性。