![Ubuntu 15.04 Google Cloud Compute VM 实例的原始来源列表](https://linux22.com/image/1466405/Ubuntu%2015.04%20Google%20Cloud%20Compute%20VM%20%E5%AE%9E%E4%BE%8B%E7%9A%84%E5%8E%9F%E5%A7%8B%E6%9D%A5%E6%BA%90%E5%88%97%E8%A1%A8.png)
我意外地sources.list
从在 Google Compute Engine 实例上运行的 Ubuntu VM 中删除了该文件。
作为亚马逊网络服务,他们也有自己的优化版本sources.list
。我需要一个原始的、未经修改的版本。
更新:根据Giacomo1968 的回答,应该有一个命名的备份sources.list
,/etc/apt/
但sources.list.save
我检查后发现在我的安装中找不到该文件:
$ ls -la
total 64
drwxr-xr-x 6 root root 4096 Sep 17 21:06 .
drwxr-xr-x 100 root root 4096 Sep 17 21:22 ..
drwxr-xr-x 2 root root 4096 Sep 9 06:54 apt.conf.d
drwxr-xr-x 2 root root 4096 Apr 7 14:44 preferences.d
-rw-r--r-- 1 root root 592 Sep 17 21:20 sources.list
drwxr-xr-x 2 root root 4096 Sep 2 07:40 sources.list.d
-rw-r--r-- 1 root root 17481 Sep 17 21:06 trusted.gpg
-rw-r--r-- 1 root root 12335 Sep 2 07:17 trusted.gpg~
drwxr-xr-x 2 root root 4096 Apr 7 14:44 trusted.gpg.d
答案1
## Note, this file is written by cloud-init on first boot of an instance
## modifications made here will not survive a re-bundle.
## if you wish to make changes you can:
## a.) add 'apt_preserve_sources_list: true' to /etc/cloud/cloud.cfg
## or do the same in user-data
## b.) add sources in /etc/apt/sources.list.d
## c.) make changes to template file /etc/cloud/templates/sources.list.tmpl
# See http://help.ubuntu.com/community/UpgradeNotes for how to upgrade to
# newer versions of the distribution.
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid main
deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid main
## Major bug fix updates produced after the final release of the
## distribution.
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates main
deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates main
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team. Also, please note that software in universe WILL NOT receive any
## review or updates from the Ubuntu security team.
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid universe
deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid universe
deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates universe
deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates universe
## N.B. software from this repository is ENTIRELY UNSUPPORTED by the Ubuntu
## team, and may not be under a free licence. Please satisfy yourself as to
## your rights to use the software. Also, please note that software in
## multiverse WILL NOT receive any review or updates from the Ubuntu
## security team.
# deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid multiverse
# deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid multiverse
# deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates multiverse
# deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-updates multiverse
## Uncomment the following two lines to add software from the 'backports'
## repository.
## N.B. software from this repository may not have been tested as
## extensively as that contained in the main release, although it includes
## newer versions of some applications which may provide useful features.
## Also, please note that software in backports WILL NOT receive any review
## or updates from the Ubuntu security team.
# deb http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse
# deb-src http://us-central1.gce.archive.ubuntu.com/ubuntu/ vivid-backports main restricted universe multiverse
## Uncomment the following two lines to add software from Canonical's
## 'partner' repository.
## This software is not part of Ubuntu, but is offered by Canonical and the
## respective vendors as a service to Ubuntu users.
# deb http://archive.canonical.com/ubuntu vivid partner
# deb-src http://archive.canonical.com/ubuntu vivid partner
deb http://security.ubuntu.com/ubuntu vivid-security main
deb-src http://security.ubuntu.com/ubuntu vivid-security main
deb http://security.ubuntu.com/ubuntu vivid-security universe
deb-src http://security.ubuntu.com/ubuntu vivid-security universe
# deb http://security.ubuntu.com/ubuntu vivid-security multiverse
# deb-src http://security.ubuntu.com/ubuntu vivid-security multiverse