Linux系统—Ubuntu18.04更换apt源
1.备份源配置文件
sudo cp /etc/apt/sources.list /etc/apt/sources_init.list
2.编辑apt源文件
#方式一(远程连接)
sudo install vim /etc/apt/sources.list
#方式二(远程连接):编辑结束后按Ctrl+x,选择是否保存后退出
sudo nano /etc/apt/sources.list
#方式三(宿主机)
sudo gedit /etc/apt/sources.list
3.替换文件内容
原文件内容
#deb cdrom:[Ubuntu 18.04.5 LTS _Bionic Beaver_ - Release amd64 (20200806.1)]/ bionic main restricted
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
# deb-src http://us.archive.ubuntu.com/ubuntu/ bionic main restricted
## Major bug fix updates produced after the final release of the
## distribution.
deb h

本文介绍如何在Ubuntu18.04系统中更换apt源,包括备份源配置文件、编辑并替换文件内容为中科大源或阿里源等步骤,并提供了更新配置文件及软件的方法。
最低0.47元/天 解锁文章
559

被折叠的 条评论
为什么被折叠?



