I have Ubuntu 12.04 LTS. I need the correct output because I edited it because it wasn't working but it has only made it worse.
-
1Easier would be for you to provide yours and we tell you what is wrong (that way you do not need to wait for someone with 12.04 ;) ) – Rinzwind Apr 03 '14 at 20:15
-
1It will depend where you are as you will be using a server close to but I live in the UK and mine is [here](http://paste.ubuntu.com/7200362/) – Warren Hill Apr 03 '14 at 20:18
-
1More or less the same with French mirrors: http://paste.ubuntu.com/7200373/ – Sylvain Pineau Apr 03 '14 at 20:21
-
Remember to give details when asking for help, like what you've already tried (or changed in this case). This situation can be avoided by making a backup of files with `cp filename.backup` before editing them. This way it's easy to revert to the original. – Starbuck Apr 30 '19 at 14:19
2 Answers
Here is a simple example of a standard /etc/apt/sources.list file for Ubuntu 22.04:
deb http://archive.ubuntu.com/ubuntu/ jammy main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ jammy-backports main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu jammy-security main restricted universe multiverse
The easiest way to edit the sources.list file is from the terminal in nano editor using the following command:
sudo nano /etc/apt/sources.list
The instructions for using nano are always displayed at the bottom of the page. Use the keyboard combination Ctrl + O and after that press Enter to save the file to its current location. Use the keyboard combination Ctrl + X to exit nano.
Make sure to run this command after changing sources.list to refresh the list of available software.
sudo apt update
A standard sources.list file for Ubuntu 20.04 looks like this:
deb http://archive.ubuntu.com/ubuntu/ focal 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
deb http://security.ubuntu.com/ubuntu focal-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu focal partner
A standard sources.list file for Ubuntu 18.04 looks like this:
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
A standard sources.list file for Ubuntu 16.04 looks like this:
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
A standard sources.list file for Ubuntu 14.04 looks like this:
deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://security.ubuntu.com/ubuntu trusty-security main restricted universe multiverse
deb http://archive.canonical.com/ubuntu trusty partner
A standard sources.list file for Ubuntu 12.04 looks like this:
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
- 110,292
- 102
- 269
- 299
-
Also it's useless to have `-backports` because even if you have it in your sources list, under default Apt settings it is not used anyway. – fkraiem May 28 '19 at 12:50
-
2According to [How do I enable the “backports” repository?](https://askubuntu.com/q/25717/) *Ubuntu Backports are enabled by default in Ubuntu.*. Reference: https://help.ubuntu.com/community/UbuntuBackports – karel May 28 '19 at 13:00
I know it is quite late to answer this question but since (being a newbie), I spent more than 24 hours due to this issue, I found this link quite helpful. It contains all default content for the ubuntu files: https://repogen.simplylinux.ch/
Actually this site takes information from the user about their distro of linux and the names of files they want and then provides the default content of files as output which we can copy and use.
- 141
- 6
-
-
1Actually this site takes information from the user about their distro of linux and the names of files they want and then provides the default content of files as output which we can copy and use. – ARK Apr 30 '19 at 12:45
-
good find. How did you find out about [this site](https://repogen.simplylinux.ch)? – lasec0203 Oct 01 '20 at 03:35
-