12.04 - cat /etc/apt/sources.list的正确内容是什么?

・3 分钟阅读

问题

我使用Ubuntu 12.04 LTS,我需要正确的内容,因为它没有工作,我就编辑了它,但是,这让它变得更糟了。


回答1

下面是/etc/apt/sources.list 12.04的标准文件的一个简单例子:


deb http://archive.ubuntu.com/ubuntu precise main universe restricted multiverse


deb http://archive.ubuntu.com/ubuntu precise-updates universe main multiverse restricted


deb http://archive.ubuntu.com/ubuntu precise-backports universe main multiverse restricted


deb http://archive.ubuntu.com/ubuntu precise-security universe main multiverse restricted



编辑sources.list文件的最简单方法是,使用以下命令来从nano编辑器中的终端中进行编辑:


sudo nano /etc/apt/sources.list 



使用键盘组合Ctrl +O,然后按Enter键将文件保存到它当前位置,使用键盘组合Ctrl +X退出nano 。

Ubuntu 16.04的标准sources.list文件如下所示:


deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse 


deb http://archive.ubuntu.com/ubuntu/ xenial-updates main restricted universe multiverse


deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu xenial-security main restricted universe multiverse 


deb http://archive.canonical.com/ubuntu xenial partner 



Ubuntu 18.04的标准sources.list文件如下所示:


deb http://archive.ubuntu.com/ubuntu/ bionic main restricted universe multiverse 


deb http://archive.ubuntu.com/ubuntu/ bionic-updates main restricted universe multiverse


deb http://archive.ubuntu.com/ubuntu/ bionic-backports main restricted universe multiverse


deb http://security.ubuntu.com/ubuntu bionic-security main restricted universe multiverse 


deb http://archive.canonical.com/ubuntu bionic partner




回答2

它包含了ubuntu文件的所有默认内容: https://repogen.simplylinux.ch/

实际上,这个站点从用户获取Linux的发行版和文件的名称,然后提供输出和使用的默认内容。


Tianye profile image