This question already has an answer here:
I accidentally removed my /etc/apt/sources.list file. Is it hosted by Canonical somewhere so I can re-add it to the system? It's a bit of an emergency, so I hope someone can provide a quick answer.
|
This question already has an answer here: I accidentally removed my |
||||
marked as duplicate by muru, Kevin Bowen, TheWanderer, waltinator, Eric Carvalho Jan 31 '17 at 20:46This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
||||
|
|
||||
|
You can boot into a Live CD (a virtual machine will suffice) and copy
From my Ubuntu 11.04 Live CD:
For the best download speed, you need to re-select a mirror near you:
You might want to enable some repositories as well, like Community-maintained Open Source software (universe) and Software restricted by copyright and legal issues (multiverse) |
||||
|
|
|
For 16.04 Here is a list you can use for Just run the following command:
and then copy and paste the following contents into the file (these should be the only lines in the file!):
Press CTRL + o and then press ENTER to save the file. Press CTRL + x to exit |
|||||||||||||||||||||
|
|
In case you are not on Ubuntu server i.e. with no GUI. You can follow the following steps:-
Wait and relax; It will automatically create the sources.list file for you. |
||||
|
|
|
I used the nifty sources.list generator over at http://repogen.simplylinux.ch/ - this may not be appropriate for everyone, but it works quickly and simply if you know which options you want to select. |
|||||||||
|