温馨提示×

ubuntu sources.list 怎样切换官方源

小樊
236
2024-07-05 13:17:26
栏目: 智能运维
Ubuntu服务器限时活动,0元免费领,库存有限,领完即止! 点击查看>>

要切换Ubuntu的官方软件源,可以按照以下步骤操作:

  1. 打开终端(Ctrl+Alt+T)。

  2. 打开sources.list文件:

sudo nano /etc/apt/sources.list
  1. 在文件中找到原来的软件源地址,将地址修改为官方源地址。可以参考下面的官方源地址:
deb http://archive.ubuntu.com/ubuntu/ focal main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ focal-backports main restricted universe multiverse
  1. 保存并关闭文件(Ctrl+X,输入Y,然后按Enter)。

  2. 更新软件包列表:

sudo apt-get update

现在你已经成功切换到Ubuntu的官方软件源了。

亿速云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>

推荐阅读:ubuntu如何修改sources.list源

0