Ich weiß, es gibt eine GUI in Ubuntu Software & Updates, um die Update-Kanäle zu aktivieren
- Aktualisierung
- vorgeschlagen
- Backports
- Sicherheit
wie in diesem Screenshot gezeigt:
Ich suche nach einer einfachen Möglichkeit, dies von einem Terminal aus mit Befehlen wie
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
und noch etwas
sudo apt-add-update enable default
sudo apt-add-update disable default
Einige Beispiele zum besseren Verständnis
Ein leeres
sources.listcat /etc/apt/sources.list<empty>sudo apt-add-update enable security<empty>
Ein aktiviertes Repository (
main)cat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily mainsudo apt-add-update enable securitydeb http://archive.ubuntu.com/ubuntu wily main deb http://archive.ubuntu.com/ubuntu wily-security main
Zwei oder mehr aktivierte Repositorys in einer oder zwei Zeilen
cat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily main universeoder
deb http://archive.ubuntu.com/ubuntu wily main deb http://archive.ubuntu.com/ubuntu wily universesudo apt-add-update enable securitydeb http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu wily-security main universeoder
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
Mit
deb-srcEinträgencat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily main universe deb-src http://archive.ubuntu.com/ubuntu wily main universesudo apt-add-update enable securitydeb 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
Mit inaktiven
deb-srcEinträgencat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily main universe # deb-src http://archive.ubuntu.com/ubuntu wily main universesudo apt-add-update enable securitydeb 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
Die
defaultSachecat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily-security universesudo apt-add-update enable defaultdeb http://archive.ubuntu.com/ubuntu wily universe deb http://archive.ubuntu.com/ubuntu wily-security universe
Nur ein Eintrag und die
disableAktioncat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily-security universesudo apt-add-update disable security<empty>
Unterschiedliche oder gleiche Server für unterschiedliche oder gleiche Speicherorte respektieren jeden Server
cat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily universe deb http://us.archive.ubuntu.com/ubuntu wily mainsudo apt-add-update enable securitydeb 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
Verschiedene Ubuntu-Versionen für verschiedene Repositories, respektieren Sie jede Version
cat /etc/apt/sources.listdeb http://archive.ubuntu.com/ubuntu wily main universe deb http://archive.ubuntu.com/ubuntu trusty mainsudo apt-add-update enable securitydeb 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
PPAs oder andere Paketquellen (nicht Canonical) in der
sources.list?Ignorieren!
Sie nicht , die Protokolle ändern, zum Beispiel
https,http,tor, ...



