So che c'è una GUI in Ubuntu Software & Updatesper abilitare i canali di aggiornamento
- aggiornamenti
- proposto
- backport
- sicurezza
come mostrato in questo screenshot:
Sto cercando un modo semplice per farlo da un terminale usando comandi come
sudo apt-add-update enable updates
sudo apt-add-update enable proposed
sudo apt-add-update enable backports
sudo apt-add-update enable security
sudo apt-add-update disable updates
sudo apt-add-update disable proposed
sudo apt-add-update disable backports
sudo apt-add-update disable security
e un'altra cosa
sudo apt-add-update enable default
sudo apt-add-update disable default
Alcuni esempi per una migliore comprensione
Un vuoto
sources.list
cat /etc/apt/sources.list
<empty>
sudo apt-add-update enable security
<empty>
Un repository abilitato (
main
)cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily main
sudo apt-add-update enable security
deb http://archive.ubuntu.com/ubuntu wily main deb http://archive.ubuntu.com/ubuntu wily-security main
Due o più repository abilitati in una o due righe
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily main universe
o
deb http://archive.ubuntu.com/ubuntu wily main deb http://archive.ubuntu.com/ubuntu wily universe
sudo apt-add-update enable security
deb http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu wily-security main universe
o
deb http://archive.ubuntu.com/ubuntu wily main deb http://archive.ubuntu.com/ubuntu wily-security main deb http://archive.ubuntu.com/ubuntu wily universe deb http://archive.ubuntu.com/ubuntu wily-security universe
Con
deb-src
vocicat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily main universe deb-src http://archive.ubuntu.com/ubuntu wily main universe
sudo apt-add-update enable security
deb http://archive.ubuntu.com/ubuntu wily main universe deb-src http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu wily-security main universe deb-src http://archive.ubuntu.com/ubuntu wily-security main universe
Con
deb-src
voci inattivecat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily main universe # deb-src http://archive.ubuntu.com/ubuntu wily main universe
sudo apt-add-update enable security
deb http://archive.ubuntu.com/ubuntu wily main universe # deb-src http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu wily-security main universe
La
default
cosacat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily-security universe
sudo apt-add-update enable default
deb http://archive.ubuntu.com/ubuntu wily universe deb http://archive.ubuntu.com/ubuntu wily-security universe
Solo una voce e l'
disable
azionecat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily-security universe
sudo apt-add-update disable security
<empty>
Server diversi o uguali per server diversi o diversi, rispettano ciascun server
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily universe deb http://us.archive.ubuntu.com/ubuntu wily main
sudo apt-add-update enable security
deb http://archive.ubuntu.com/ubuntu wily universe deb http://us.archive.ubuntu.com/ubuntu wily main deb http://archive.ubuntu.com/ubuntu wily-security universe deb http://us.archive.ubuntu.com/ubuntu wily-security main
Diverse versioni di Ubuntu per diversi repository, rispettano ciascuna versione
cat /etc/apt/sources.list
deb http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu trusty main
sudo apt-add-update enable security
deb http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu trusty main deb http://archive.ubuntu.com/ubuntu wily-security main universe deb http://archive.ubuntu.com/ubuntu trusty-security main
PPA o altre fonti di pacchetto (non canonico) nel
sources.list
?Ignorare!
Non modificare i protocolli, ad esempio
https
,http
,tor
, ...