Difference between revisions of "Debian - handbook for apt-get"

From Blue-IT.org Wiki

(APT)
(APT)
Line 38: Line 38:
  
 
==APT==
 
==APT==
 +
=== GPG ===
 +
 +
If you get an error about a missing key, do:
 +
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <###################>
 +
 +
where ''<###################>'' is the key which was given in the error.
 +
 +
Otherwise, if you have a keyfile, do:
 +
wget -qO - http://source.url/to/the.key | sudo apt-key add -
 +
 
=== Updaten / update ===
 
=== Updaten / update ===
 
  apt-get update
 
  apt-get update

Revision as of 15:56, 20 April 2014

Konsole öffnen, als Administrator anmelden. Open a console (terminal) and login as root.

Also see

Navigate

Navigieren in Verzeichnissen

Wo bin ich?

pwd

Verzeichnis anzeigen

ls

In Verzeichnis wechseln. (Tip: mit Tabulatortaste vervollständigen)

ls
cd Ve (Tabulatortaste drücken)
cd Verzeichnisname

Verzeichnis runter

cd ..

Locate

Datei suchen / Search for files

1. Suchdatenbank aktualisieren / actuate search database

updatedb

2. Suchen / search

locate dateiname | grep muster

Beispiel für Dateinamen / Examples for filenames

locate *.rpm | grep synaptic
locate *.doc | grep tax
locate *.txt

APT

GPG

If you get an error about a missing key, do:

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys <###################>

where <###################> is the key which was given in the error.

Otherwise, if you have a keyfile, do:

wget -qO - http://source.url/to/the.key | sudo apt-key add -

Updaten / update

apt-get update

Suchen / search

apt-cache search irgendein_name

Pakete installieren / install packages

apt-get install (--reinstall) irgendein_paket

Pakete deinstallieren (VOLLSTÄNDIG) / uninstall packages

apt-get remove (--purge) irgendein_paket

Distribution auf den neuesten Stand bringen / Distribution update

apt-get upgrade
apt-get dist-upgrade

Schiefgelaufene Installation wiederholen / Redo an installation

apt-get -f install

Komplettes Desaster korrigieren / Desaster recovery

dpkg --reconfigure -a

Get all deb entries in all sources-list (for apt-mirror)

find /etc/apt -name "*.list" | grep -v mirror.list | awk '{system("cat " $0 " | grep -v deb-src | egrep ^deb")}'

Paketliste erstellen und zurückspielen

dpkg --get-selections > selections.list

Replay:

dpkg --set-selections < selections.list
apt-get dselect-upgrade

Clear the selections cache:

dpkg --clear-selections