Adding source lists using apt-setup

apt-setup is an interactive program that simplifies adding sources to apt’s sources.list. It knows about all the major debian mirrors and can help you select one. It can even use apt-cdrom to scan CDs.

If you want to run apt-setup use the following command

#apt-setup

You should see the following screen from here you can select archive access method for apt i have selected http and select ok and press enter

[thumb:313:c:l=p]

Now you need to select the mirror country and i have selected uk and select ok and press enter

[thumb:312:c:l=p]

Here you need to choose the debian mirror from the available list and i have selected www.mirror.ac.uk select ok and press enter
[thumb:314:c:l=p]

Now you need to enter the proxy information if have one otherwise leave blank select ok and press enter
[thumb:315:c:l=p]

This screen you can see it will test apt sources and it add these source to /etc/apt/sources.list file

[thumb:316:c:l=p]

it will ask if you want to add another source and i have selected no

[thumb:317:c:l=p]

That’s it this is very useful if you want to add more apt sources for your debian system.

Sponsored Link

6 thoughts on “Adding source lists using apt-setup

  1. If you can’t find this, then use software-properties-gtk instead. I know it is not CLI, but if you want CLI, then just edit the file manually.

  2. From original post (2006) to now (2019) is a long time.

    ‘netselect-apt’ tests and finds the best debian mirrors and then creates a ‘sources.list’ file in the current directory.

    $ sudo apt install –install-suggests netselect
    $ sudo netselect-apt

Leave a comment

Your email address will not be published. Required fields are marked *