What is the correct output of cat /etc/apt/sources.list?

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.

4

2 Answers

Here is a simple example of a standard /etc/apt/sources.list file for Ubuntu 12.04:

deb precise main universe restricted multiverse
deb precise-updates universe main multiverse restricted
deb precise-backports universe main multiverse restricted
deb precise-security universe main multiverse restricted

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 16.04 looks like this:

deb xenial main restricted universe multiverse
deb xenial-updates main restricted universe multiverse
deb xenial-backports main restricted universe multiverse
deb xenial-security main restricted universe multiverse
deb xenial partner 

A standard sources.list file for Ubuntu 18.04 looks like this:

deb bionic main restricted universe multiverse
deb bionic-updates main restricted universe multiverse
deb bionic-backports main restricted universe multiverse
deb bionic-security main restricted universe multiverse
deb bionic partner 

A standard sources.list file for Ubuntu 20.04 looks like this:

deb focal main restricted universe multiverse
deb focal-updates main restricted universe multiverse
deb focal-backports main restricted universe multiverse
deb focal-security main restricted universe multiverse
deb focal partner
2

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:

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.

4

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like