Linux-Befehle
Auswahl für Webmaster
Die Quellen
Unix/Linux Command Reference (PDF-Datei) von FOSSwire.com
mit Dank an Oliver Klee für den Hinweis.
Eine gute Übersicht zu weiteren Quellen bieten die Workshop-Handouts von Oliver Klee an.
Ionos-Blog: Die wichtigsten Linux-Befehle im Überblick
man command – show the manual for command
Ctrl+C – halts the current command
Ctrl+Z – stops the current command
resume with fg in the foreground or bg in the background
Ctrl+D – log out of current session, similar to exit
Ctrl+W – erases one word in the current line
Ctrl+U – erases the whole line
Ctrl+R – type to bring up a recent command
!! - repeats the last command
exit – log out of current session
pwd – show current directory
Wenn mehrere Optionen, so genügt ein Bindestrich
ls – directory listing
ls -al – formatted listing with hidden files
-S Sortiert nach Größe
-t Sortiert nach Zeit (letzte Veränderung) anstelle des Namens
cd dir - change directory to dir
cd – change to home
mkdir dir – create a directory dir
rm file – delete file
rm -r dir – delete directory dir (inlusive aller Unterverzeichnisse)
rm -f file – force remove file (keine Nachfragen, keine Fehlermeldungen)
rm -rf dir – force remove directory dir *(VORSICHT, sehr gefährlich!)
cp file1 file2 – copy file1 to file2
cp -r dir1 dir2 – copy dir1 to dir2 (mit Unterverzeichnissen)
-b backup vor Überschreiben
-u update
mv file1 file2 – rename or move file1 to file2
if file2 is an existing directory, moves file1 into directory file2
-b backup vor Überschreiben
-u verschiebt nur, wenn neuer
ln -s file link – create symbolic link link to file
touch file – create or update file
cat > file – places standard input into file
more file – output the contents of file
ssh user@host – connect to host as user
grep pattern files – search for pattern in files
grep -r pattern dir – search recursively for pattern in dir
command | grep pattern – search for pattern in the output of command
locate file – find all instances of file
date – show the current date and time
w – display who is online
whoami – who you are logged in as
finger user – display information about user
last - die letzten Logins
tar cf file.tar files – create a tar named file.tar containing files
tar czf file.tar.gz files – create a tar with Gzip compression
tar cjf file.tar.bz2 – create a tar with Bzip2 compression
gzip file – compresses file and renames it to file.gz
tar xf file.tar – extract the files from file.tar
tar xzf file.tar.gz – extract a tar using Gzip
tar xjf file.tar.bz2 – extract a tar using Bzip2
gzip -d file.gz – decompresses file.gz back to file
ping host – ping host and output results
whois domain – get whois information for domain
dig domain – get DNS information for domain
dig -x host – reverse lookup host
wget file – download file
wget -c file – continue a stopped download