Linux: Amministrazione sistema, Documentazione, HowTo, Tutorial, Recensioni, Manuale, Programmi, Software
Linux Command Line - nothing it's impossible by command line!
English - English  Italiano - Italian  Español - Spanish  Français - French  Deutsch - German  Česká republika - Czech Republic  Polski - Polish  Па-беларуску - Byelorussian  中国 - Chinese  Русский - Russian  Português - Brazil Portuguese  فارسی - Persian  ελληνικά - Greek  العربية - Arabic  Indonesia - Indonesian  
 Download offline copy of Linux Command Line Download offline copy
 Credits
  Edit / Translate
 ToDO (Help US)
 Terms of Use and License
 About project
 
Follow us on...
Join our Linux Facebook Group
Follow us on twitter!
 
News Letter
Sign-up me to receive the news about this document
 
 
Version
Linux Command Line
version 1.4
Last modified date: 2009-07-03
Created Date: 2008-01-06
 
Home page

Linux Command Line in Deutsch



|  System information  | Shutdown, Restart and Logout of a system  | Files and Directory  | File search  | Mounting a Filesystem  | Disk Space  | Users and Groups  | Permits on Files  | Special Attributes on files  | Archives and compressed files  | RPM Packages ( Fedora, Red Hat and like)  | YUM packages tool (Fedora, RedHat and alike)  | DEB packages (Debian, Ubuntu and like)  | APT packages tool (Debian, Ubuntu and alike)  | View file content  | Text Manipulation  | Character set and Format file conversion  | Filesystem Analysis  | Format a Filesystem  | Filesystem SWAP  | Backup  | CDROM   | Networking (LAN / WiFi)  | Microsoft Windows networks (samba)  | IPTABLES (firewall)  | Monitoring and debugging  | Others useful commands  | Pacman packages tool (Arch, Frugalware and alike)  |

System information

Command Description
# arch die Architektur des Computers zeigen   [man]
# cal 2007 den Kalender 2007 zeigen   [man]
# cat /proc/cpuinfo die Information über CPU zeigen   [man]
# cat /proc/interrupts die Interrupts zeigen   [man]
# cat /proc/meminfo die Ausnutzung des Speichers zeigen   [man]
# cat /proc/swaps die Information über Swap(s) zeigen   [man]
# cat /proc/version die Versionsnummer des Kernels zeigen   [man]
# cat /proc/net/dev Netzwerkadapter und Statistiken zeigen   [man]
# cat /proc/mounts die gemounteten Dateisysteme zeigen   [man]
# clock -w save date changes on BIOS [english]
Description not available for this language[German?]
# date zeige Systemdatum
# date 041217002007.00 Datum und Zeit einstellen - MonatTagStundenMinutenJahr.Sekunden
# dmidecode -q zeige Hardware System Komponenten - (SMBIOS / DMI)
# hdparm -i /dev/hda zeige Informationen zur Festplatte
# hdparm -tT /dev/sda führe einen Lesetest mit der Festplatte durch
# lspci -tv zeige Informationen zu PCI Bauteilen
# lsusb -tv zeige Informationen zu USB Bauteilen
# uname -m zeige Info zur Systemarchitektur des Rechners
# uname -r zeige verwendete Kernel Version
 « TOP «

Shutdown, Restart and Logout of a system

Command Description
# init 0 System herunterfahren
# logout Sitzung verlassen
# reboot reboot(2) [english]
Description not available for this language[German?]
# shutdown -h now das System sofort herunterfahren
# shutdown -h 16:30 & geplanten Neustart des System einstellen
# shutdown -c geplanten Neustart des Systems abbrechen
# shutdown -r now das System sofort herunterfahren und neu starten
# telinit 0 shutdown system(3) [english]
Description not available for this language[German?]
 « TOP «

Files and Directory

Command Description
# cd /home in das Verzeichnis '/home' wechseln
# cd .. eine Verzeichnisstufe zurück
# cd ../.. zwei Verzeichnisstufen zurück
# cd zum Stammverzeichnis wechseln
# cd ~user1 zum "home" Verzeichnis wechseln
# cd - zum vorherigen Verzeichnis wechseln
# cp file1 file2 Datei kopieren
# cp dir/* . kopiert alle Dateien eines Verzeichnises in das aktuelle Arbeitsverzeichnis
# cp -a /tmp/dir1 . kopiert ein Verzeichnis in das aktuelle Arbeitsverzeichnis
# cp -a dir1 dir2 Verzeichnis kopieren
# cp file file1 Datei zu Datei1 kopieren
# iconv -l zeigt bekannte Zeichensatzkodierungen
# iconv -f fromEncoding -t toEncoding inputFile > outputFile Konvertierung der Kodierung einer Datei zu einem anderen Format
# find . -maxdepth 1 -name *.jpg -print -exec convert batch resize files in the current directory and send them to a thumbnails directory (requires convert from Imagemagick) [english]
Description not available for this language[German?]
# ln -s file1 lnk1 create a symbolic link to file or directory [english]
Description not available for this language[German?]
# ln file1 lnk1 create a physical link to file or directory [english]
Description not available for this language[German?]
# ls zeige alle Inhalte des aktuellen Verzeichnis
# ls -F view files of directory [english]
Description not available for this language[German?]
# ls -l mehr Details zu Dateien und Verzeichnissen anzeigen
# ls -a auch versteckte Dateien anzeigen
# ls *[0-9]* zeige Dateien und Verzeichnisse die bestimmte Zahlen enthalten
# lstree zeige Dateien und Verzeichnisse in Baumstruktur beginnend mit dem Hauptverzeichnis
# mkdir dir1 create a directory called 'dir1' [english]
Description not available for this language[German?]
# mkdir dir1 dir2 create two directories simultaneously [english]
Description not available for this language[German?]
# mkdir -p /tmp/dir1/dir2 create a directory tree [english]
Description not available for this language[German?]
# mv dir1 new_dir rename / move a file or directory [english]
Description not available for this language[German?]
# pwd show the path of work directory [english]
Description not available for this language[German?]
# rm -f file1 delete file called 'file1' [english]
Description not available for this language[German?]
# rm -rf dir1 remove a directory called 'dir1' and contents recursively [english]
Description not available for this language[German?]
# rm -rf dir1 dir2 remove two directories and their contents recursively [english]
Description not available for this language[German?]
# rmdir dir1 delete directory called 'dir1' [english]
Description not available for this language[German?]
# touch -t 0712250000 file1 modify timestamp of a file or directory - (YYMMDDhhmm) [english]
Description not available for this language[German?]
# tree show files and directories in a tree starting from root(1) [english]
Description not available for this language[German?]
 « TOP «

File search

Command Description
# find / -name file1 search file and directory into root filesystem from '/' [english]
Description not available for this language[German?]
# find / -user user1 search files and directories belonging to 'user1' [english]
Description not available for this language[German?]
# find /home/user1 -name \*.bin search files with '. bin' extension within directory '/ home/user1' [english]
Description not available for this language[German?]
# find /usr/bin -type f -atime +100 search binary files are not used in the last 100 days [english]
Description not available for this language[German?]
# find /usr/bin -type f -mtime -10 search files created or changed within 10 days [english]
Description not available for this language[German?]
# find / -name *.rpm -exec chmod 755 '{}' \; search files with '.rpm' extension and modify permits [english]
Description not available for this language[German?]
# find / -xdev -name \*.rpm search files with '.rpm' extension ignoring removable partitions as cdrom, pen-drive, etc.… [english]
Description not available for this language[German?]
# locate \*.ps find files with the '.ps' extension - first run 'updatedb' command [english]
Description not available for this language[German?]
# whereis halt show location of a binary file, source or man [english]
Description not available for this language[German?]
# which halt show full path to a binary / executable [english]
Description not available for this language[German?]
 « TOP «

Mounting a Filesystem

Command Description
# fuser -km /mnt/hda2 force umount when the device is busy [english]
Description not available for this language[German?]
# mount /dev/hda2 /mnt/hda2 mount disk called hda2 - verify existence of the directory '/ mnt/hda2' [english]
Description not available for this language[German?]
# mount /dev/fd0 /mnt/floppy mount a floppy disk [english]
Description not available for this language[German?]
# mount /dev/cdrom /mnt/cdrom mount a cdrom / dvdrom [english]
Description not available for this language[German?]
# mount /dev/hdc /mnt/cdrecorder mount a cdrw / dvdrom [english]
Description not available for this language[German?]
# mount /dev/hdb /mnt/cdrecorder mount a cdrw / dvdrom [english]
Description not available for this language[German?]
# mount -o loop file.iso /mnt/cdrom mount a file or iso image [english]
Description not available for this language[German?]
# mount -t vfat /dev/hda5 /mnt/hda5 mount a Windows FAT32 file system [english]
Description not available for this language[German?]
# mount /dev/sda1 /mnt/usbdisk mount a usb pen-drive or flash-drive [english]
Description not available for this language[German?]
# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mount a windows network share [english]
Description not available for this language[German?]
# umount /dev/hda2 unmount disk called hda2 - exit from mount point '/ mnt/hda2' first [english]
Description not available for this language[German?]
# umount -n /mnt/hda2 run umount without writing the file /etc/mtab - useful when the file is read-only or the hard disk is full [english]
Description not available for this language[German?]
 « TOP «

Disk Space

Command Description
# df -h show list of partitions mounted [english]
Description not available for this language[German?]
# dpkg-query -W -f='${Installed-Size;10}t${Package}n' | sort -k1,1n show the used space by installed deb packages, sorting by size (debian, ubuntu and alike) [english]
Description not available for this language[German?]
# du -sh dir1 estimate space used by directory 'dir1' [english]
Description not available for this language[German?]
# du -sk * | sort -rn show size of the files and directories sorted by size [english]
Description not available for this language[German?]
# ls -lSr |more show size of the files and directories ordered by size [english]
Description not available for this language[German?]
# rpm -q -a --qf '%10{SIZE}t%{NAME}n' | sort -k1,1n show space used by rpm packages installed sorted by size (fedora, redhat and like) [english]
Description not available for this language[German?]
 « TOP «

Users and Groups

Command Description
# chage -E 2005-12-31 user1 set deadline for user password [english]
Description not available for this language[German?]
# groupadd [group] create a new group [english]
Description not available for this language[German?]
# groupdel [group] delete a group [english]
Description not available for this language[German?]
# groupmod -n moon sun rename a group from moon to sun [english]
Description not available for this language[German?]
# grpck check correct syntax and file format of '/etc/group' and groups existence [english]
Description not available for this language[German?]
# newgrp - [group] log into a new group to change default group of newly created files [english]
Description not available for this language[German?]
# passwd change password [english]
Description not available for this language[German?]
# passwd user1 change a user password (only by root) [english]
Description not available for this language[German?]
# pwck check correct syntax and file format of '/etc/passwd' and users existence [english]
Description not available for this language[German?]
# useradd -c "User Linux" -g admin -d /home/user1 -s /bin/bash user1 create a new user "user1" belongs "admin" group [english]
Description not available for this language[German?]
# useradd user1 create a new user [english]
Description not available for this language[German?]
# userdel -r user1 delete a user ( '-r' eliminates home directory) [english]
Description not available for this language[German?]
# usermod -c "User FTP" -g system -d /ftp/user1 -s /bin/nologin user1 change user attributes [english]
Description not available for this language[German?]
 « TOP «

Permits on Files

Command Description
# chgrp group1 file1 change group of files [english]
Description not available for this language[German?]
# chmod ugo+rwx directory1 set permissions reading (r), write (w) and (x) access to users owner (u) group (g) and others (o) [english]
Description not available for this language[German?]
# chmod go-rwx directory1 remove permits reading (r), write (w) and (x) access to users group (g) and others (or [english]
Description not available for this language[German?]
# chmod u+s /bin/file1 set SUID bit on a binary file - the user that running that file gets same privileges as owner [english]
Description not available for this language[German?]
# chmod u-s /bin/file1 disable SUID bit on a binary file [english]
Description not available for this language[German?]
# chmod g+s /home/public set SGID bit on a directory - similar to SUID but for directory [english]
Description not available for this language[German?]
# chmod g-s /home/public disable SGID bit on a directory [english]
Description not available for this language[German?]
# chmod o+t /home/public set STIKY bit on a directory - allows files deletion only to legitimate owners [english]
Description not available for this language[German?]
# chmod o-t /home/public disable STIKY bit on a directory [english]
Description not available for this language[German?]
# chown user1 file1 change owner of a file [english]
Description not available for this language[German?]
# chown -R user1 directory1 change user owner of a directory and all the files and directories contained inside [english]
Description not available for this language[German?]
# chown user1:group1 file1 change user and group ownership of a file [english]
Description not available for this language[German?]
# find / -perm -u+s view all files on the system with SUID configured [english]
Description not available for this language[German?]
# ls -lh show permits on files [english]
Description not available for this language[German?]
# ls /tmp | pr -T5 -W$COLUMNS divide terminal into 5 columns [english]
Description not available for this language[German?]
 « TOP «

Special Attributes on files

Command Description
# chattr +a file1 allows write opening of a file only append mode [english]
Description not available for this language[German?]
# chattr +c file1 allows that a file is compressed / decompressed automatically by the kernel [english]
Description not available for this language[German?]
# chattr +d file1 makes sure that the program ignores Dump the files during backup [english]
Description not available for this language[German?]
# chattr +i file1 makes it an immutable file, which can not be removed, altered, renamed or linked [english]
Description not available for this language[German?]
# chattr +s file1 allows a file to be deleted safely [english]
Description not available for this language[German?]
# chattr +S file1 makes sure that if a file is modified changes are written in synchronous mode as with sync [english]
Description not available for this language[German?]
# chattr +u file1 allows you to recover the contents of a file even if it is canceled [english]
Description not available for this language[German?]
# lsattr show specials attributes [english]
Description not available for this language[German?]
 « TOP «

Archives and compressed files

Command Description
# bunzip2 file1.bz2 decompress a file called 'file1.bz2' [english]
Description not available for this language[German?]
# bzip2 file1 compress a file called 'file1' [english]
Description not available for this language[German?]
# gunzip file1.gz decompress a file called 'file1.gz' [english]
Description not available for this language[German?]
# gzip file1 compress a file called 'file1' [english]
Description not available for this language[German?]
# gzip -9 file1 compress with maximum compression [english]
Description not available for this language[German?]
# rar a file1.rar test_file create an archive rar called 'file1.rar' [english]
Description not available for this language[German?]
# rar a file1.rar file1 file2 dir1 compress 'file1', 'file2' and 'dir1' simultaneously [english]
Description not available for this language[German?]
# rar x file1.rar decompress rar archive [english]
Description not available for this language[German?]
# tar -cvf archive.tar file1 create a uncompressed tarball [english]
Description not available for this language[German?]
# tar -cvf archive.tar file1 file2 dir1 create an archive containing 'file1', 'file2' and 'dir1' [english]
Description not available for this language[German?]
# tar -tf archive.tar show contents of an archive [english]
Description not available for this language[German?]
# tar -xvf archive.tar extract a tarball [english]
Description not available for this language[German?]
# tar -xvf archive.tar -C /tmp extract a tarball into / tmp [english]
Description not available for this language[German?]
# tar -cvfj archive.tar.bz2 dir1 create a tarball compressed into bzip2 [english]
Description not available for this language[German?]
# tar -xvfj archive.tar.bz2 decompress a compressed tar archive in bzip2 [english]
Description not available for this language[German?]
# tar -cvfz archive.tar.gz dir1 create a tarball compressed into gzip [english]
Description not available for this language[German?]
# tar -xvfz archive.tar.gz decompress a compressed tar archive in gzip [english]
Description not available for this language[German?]
# unrar x file1.rar decompress rar archive [english]
Description not available for this language[German?]
# unzip file1.zip decompress a zip archive [english]
Description not available for this language[German?]
# zip file1.zip file1 create an archive compressed in zip [english]
Description not available for this language[German?]
# zip -r file1.zip file1 file2 dir1 compress in zip several files and directories simultaneously [english]
Description not available for this language[German?]
 « TOP «

RPM Packages ( Fedora, Red Hat and like)

Command Description
# rpm -ivh [package.rpm] install a rpm package [english]
Description not available for this language[German?]
# rpm -ivh --nodeeps [package.rpm] install a rpm package ignoring dependencies requests [english]
Description not available for this language[German?]
# rpm -U [package.rpm] upgrade a rpm package without changing configuration files [english]
Description not available for this language[German?]
# rpm -F [package.rpm] upgrade a rpm package only if it is already installed [english]
Description not available for this language[German?]
# rpm -e [package] remove a rpm package [english]
Description not available for this language[German?]
# rpm -qa show all rpm packages installed on the system [english]
Description not available for this language[German?]
# rpm -qa | grep httpd show all rpm packages with the name "httpd" [english]
Description not available for this language[German?]
# rpm -qi [package] obtain information on a specific package installed [english]
Description not available for this language[German?]
# rpm -qg "System Environment/Daemons" show rpm packages of a group software [english]
Description not available for this language[German?]
# rpm -ql [package] show list of files provided by a rpm package installed [english]
Description not available for this language[German?]
# rpm -qc [package] show list of configuration files provided by a rpm package installed [english]
Description not available for this language[German?]
# rpm -q [package] --whatrequires show list of dependencies required for a rpm packet [english]
Description not available for this language[German?]
# rpm -q [package] --whatprovides show capability provided by a rpm package [english]
Description not available for this language[German?]
# rpm -q [package] --scripts show scripts started during installation / removal [english]
Description not available for this language[German?]
# rpm -q [package] --changelog show history of revisions of a rpm package [english]
Description not available for this language[German?]
# rpm -qf /etc/httpd/conf/httpd.conf verify which rpm package belongs to a given file [english]
Description not available for this language[German?]
# rpm -qp [package.rpm] -l show list of files provided by a rpm package not yet installed [english]
Description not available for this language[German?]
# rpm --import /media/cdrom/RPM-GPG-KEY import public-key digital signature [english]
Description not available for this language[German?]
# rpm --checksig [package.rpm] verify the integrity of a rpm package [english]
Description not available for this language[German?]
# rpm -qa gpg-pubkey verify integrity of all rpm packages installed [english]
Description not available for this language[German?]
# rpm -V [package] check file size, permissions, type, owner, group, MD5 checksum and last modification [english]
Description not available for this language[German?]
# rpm -Va check all rpm packages installed on the system - use with caution [english]
Description not available for this language[German?]
# rpm -Vp [package.rpm] verify a rpm package not yet installed [english]
Description not available for this language[German?]
# rpm -ivh /usr/src/redhat/RPMS/`arch`/[package.rpm] install a package built from a rpm source [english]
Description not available for this language[German?]
# rpm2cpio [package.rpm] | cpio --extract --make-directories *bin* extract executable file from a rpm package [english]
Description not available for this language[German?]
# rpmbuild --rebuild [package.src.rpm] build a rpm package from a rpm source [english]
Description not available for this language[German?]
 « TOP «

YUM packages tool (Fedora, RedHat and alike)

Command Description
# yum -y install [package] download and install a rpm package [english]
Description not available for this language[German?]
# yum localinstall [package.rpm] That will install an RPM, and try to resolve all the dependencies for you using your repositories. [english]
Description not available for this language[German?]
# yum -y update update all rpm packages installed on the system [english]
Description not available for this language[German?]
# yum update [package] upgrade a rpm package [english]
Description not available for this language[German?]
# yum remove [package] remove a rpm package [english]
Description not available for this language[German?]
# yum list list all packages installed on the system [english]
Description not available for this language[German?]
# yum search [package] find a package on rpm repository [english]
Description not available for this language[German?]
# yum clean [package] clean up rpm cache erasing downloaded packages [english]
Description not available for this language[German?]
# yum clean headers remove all files headers that the system uses to resolve dependency [english]
Description not available for this language[German?]
# yum clean all remove from the cache packages and headers files [english]
Description not available for this language[German?]
 « TOP «

DEB packages (Debian, Ubuntu and like)

Command Description
# dpkg -i [package.deb] install / upgrade a deb package [english]
Description not available for this language[German?]
# dpkg -r [package] remove a deb package from the system [english]
Description not available for this language[German?]
# dpkg -l show all deb packages installed on the system [english]
Description not available for this language[German?]
# dpkg -l | grep httpd show all deb packages with the name "httpd" [english]
Description not available for this language[German?]
# dpkg -s [package] obtain information on a specific package installed on system [english]
Description not available for this language[German?]
# dpkg -L [package] show list of files provided by a package installed on system [english]
Description not available for this language[German?]
# dpkg --contents [package.deb] show list of files provided by a package not yet installed [english]
Description not available for this language[German?]
# dpkg -S /bin/ping verify which package belongs to a given file [english]
Description not available for this language[German?]
 « TOP «

APT packages tool (Debian, Ubuntu and alike)

Command Description
# apt-cache search [package] returns list of packages which corresponds string "searched-packages" [english]
Description not available for this language[German?]
# apt-cdrom install [package] install / upgrade a deb package from cdrom [english]
Description not available for this language[German?]
# apt-get install [package] install / upgrade a deb package [english]
Description not available for this language[German?]
# apt-get update update the package list [english]
Description not available for this language[German?]
# apt-get upgrade upgrade all of the installed packages [english]
Description not available for this language[German?]
# apt-get remove [package] remove a deb package from system [english]
Description not available for this language[German?]
# apt-get check verify correct resolution of dependencies [english]
Description not available for this language[German?]
# apt-get clean clean up cache from packages downloaded [english]
Description not available for this language[German?]
 « TOP «

Pacman packages tool (Arch, Frugalware and alike)

Command Description
# pacman -S name Install package 'name' with dependencies [english]
Description not available for this language[German?]
# pacman -R name Delete package 'name' and all files of it [english]
Description not available for this language[German?]
 « TOP «

View file content

Command Description
# cat file1 view the contents of a file starting from the first row [english]
Description not available for this language[German?]
# head -2 file1 view first two lines of a file [english]
Description not available for this language[German?]
# less file1 similar to 'more' command but which allows backward movement in the file as well as forward movement [english]
Description not available for this language[German?]
# more file1 view content of a file along [english]
Description not available for this language[German?]
# tac file1 view the contents of a file starting from the last line [english]
Description not available for this language[German?]
# tail -2 file1 view last two lines of a file [english]
Description not available for this language[German?]
# tail -f /var/log/messages view in real time what is added to a file [english]
Description not available for this language[German?]
 « TOP «

Text Manipulation

Command Description
# cat example.txt | awk 'NR%2==1' remove all even lines from example.txt [english]
Description not available for this language[German?]
# echo a b c | awk '{print $1}' view the first column of a line [english]
Description not available for this language[German?]
# echo a b c | awk '{print $1,$3}' view the first and third column of a line [english]
Description not available for this language[German?]
# cat -n file1 number row of a file [english]
Description not available for this language[German?]
# comm -1 file1 file2 compare contents of two files by deleting only unique lines from 'file1' [english]
Description not available for this language[German?]
# comm -2 file1 file2 compare contents of two files by deleting only unique lines from 'file2' [english]
Description not available for this language[German?]
# comm -3 file1 file2 compare contents of two files by deleting only the lines that appear on both files [english]
Description not available for this language[German?]
# diff file1 file2 find differences between two files [english]
Description not available for this language[German?]
# grep Aug /var/log/messages look up words "Aug" on file '/var/log/messages' [english]
Description not available for this language[German?]
# grep ^Aug /var/log/messages look up words that begin with "Aug" on file '/var/log/messages' [english]
Description not available for this language[German?]
# grep [0-9] /var/log/messages select from file '/var/log/messages' all lines that contain numbers [english]
Description not available for this language[German?]
# grep Aug -R /var/log/* search string "Aug" at directory '/var/log' and below [english]
Description not available for this language[German?]
# paste file1 file2 merging contents of two files for columns [english]
Description not available for this language[German?]
# paste -d '+' file1 file2 merging contents of two files for columns with '+' delimiter on the center [english]
Description not available for this language[German?]
# sdiff file1 file2 find differences between two files and merge interactively alike "diff" [english]
Description not available for this language[German?]
# sed 's/string1/string2/g' example.txt replace "string1" with "string2" in example.txt [english]
Description not available for this language[German?]
# sed '/^$/d' example.txt remove all blank lines from example.txt [english]
Description not available for this language[German?]
# sed '/ *#/d; /^$/d' example.txt remove comments and blank lines from example.txt [english]
Description not available for this language[German?]
# sed -e '1d' exampe.txt eliminates the first line from file example.txt [english]
Description not available for this language[German?]
# sed -n '/string1/p' view only lines that contain the word "string1" [english]
Description not available for this language[German?]
# sed -e 's/ *$//' example.txt remove empty characters at the end of each row [english]
Description not available for this language[German?]
# sed -e 's/string1//g' example.txt remove only the word "string1" from text and leave intact all [english]
Description not available for this language[German?]
# sed -n '1,5p' example.txt print from 1th to 5th row of example.txt [english]
Description not available for this language[German?]
# sed -n '5p;5q' example.txt print row number 5 of example.txt [english]
Description not available for this language[German?]
# sed -e 's/00*/0/g' example.txt replace more zeros with a single zero [english]
Description not available for this language[German?]
# sort file1 file2 sort contents of two files [english]
Description not available for this language[German?]
# sort file1 file2 | uniq sort contents of two files omitting lines repeated [english]
Description not available for this language[German?]
# sort file1 file2 | uniq -u sort contents of two files by viewing only unique line [english]
Description not available for this language[German?]
# sort file1 file2 | uniq -d sort contents of two files by viewing only duplicate line [english]
Description not available for this language[German?]
# echo 'word' | tr '[:lower:]' '[:upper:]' convert from lower case in upper case [english]
Description not available for this language[German?]
 « TOP «

Character set and Format file conversion

Command Description
# dos2unix filedos.txt fileunix.txt convert a text file format from MSDOS to UNIX [english]
Description not available for this language[German?]
# recode ..HTML < page.txt > page.html convert a text file to html [english]
Description not available for this language[German?]
# recode -l | more show all available formats conversion [english]
Description not available for this language[German?]
# unix2dos fileunix.txt filedos.txt convert a text file format from UNIX to MSDOS [english]
Description not available for this language[German?]
 « TOP «

Filesystem Analysis

Command Description
# badblocks -v /dev/hda1 check bad blocks on disk hda1 [english]
Description not available for this language[German?]
# dosfsck /dev/hda1 repair / check integrity of dos filesystems on disk hda1 [english]
Description not available for this language[German?]
# e2fsck /dev/hda1 repair / check integrity of ext2 filesystem on disk hda1 [english]
Description not available for this language[German?]
# e2fsck -j /dev/hda1 repair / check integrity of ext3 filesystem on disk hda1 [english]
Description not available for this language[German?]
# fsck /dev/hda1 repair / check integrity of linux filesystem on disk hda1 [english]
Description not available for this language[German?]
# fsck.ext2 /dev/hda1 repair / check integrity of ext2 filesystem on disk hda1 [english]
Description not available for this language[German?]
# fsck.ext3 /dev/hda1 repair / check integrity of ext3 filesystem on disk hda1 [english]
Description not available for this language[German?]
# fsck.vfat /dev/hda1 repair / check integrity of fat filesystem on disk hda1 [english]
Description not available for this language[German?]
# fsck.msdos /dev/hda1 repair / check integrity of dos filesystem on disk hda1 [english]
Description not available for this language[German?]
 « TOP «

Format a Filesystem

Command Description
# fdformat -n /dev/fd0 format a floppy disk [english]
Description not available for this language[German?]
# mke2fs /dev/hda1 create a filesystem type linux ext2 on hda1 partition [english]
Description not available for this language[German?]
# mke2fs -j /dev/hda1 create a filesystem type linux ext3 (journal) on hda1 partition [english]
Description not available for this language[German?]
# mkfs /dev/hda1 create a filesystem type linux on hda1 partition [english]
Description not available for this language[German?]
# mkfs -t vfat 32 -F /dev/hda1 create a FAT32 filesystem [english]
Description not available for this language[German?]
# mkswap /dev/hda3 create a swap filesystem [english]
Description not available for this language[German?]
 « TOP «

Filesystem SWAP

Command Description
# mkswap /dev/hda3 create a swap filesystem [english]
Description not available for this language[German?]
# swapon /dev/hda3 activating a new swap partition [english]
Description not available for this language[German?]
# swapon /dev/hda2 /dev/hdb3 activate two swap partitions [english]
Description not available for this language[German?]
 « TOP «

Backup

Command Description
# find /var/log -name '*.log' | tar cv --files-from=- | bzip2 > log.tar.bz2 find all files with '.log' extention and make an bzip archive [english]
Description not available for this language[German?]
# find /home/user1 -name '*.txt' | xargs cp -av --target-directory=/home/backup/ --parents find and copy all files with '.txt' extention from a directory to another [english]
Description not available for this language[German?]
# dd bs=1M if=/dev/hda | gzip | ssh user@ip_addr 'dd of=hda.gz' make a backup of a local hard disk on remote host via ssh [english]
Description not available for this language[German?]
# dd if=/dev/sda of=/tmp/file1 backup content of the harddrive to a file [english]
Description not available for this language[German?]
# dd if=/dev/hda of=/dev/fd0 bs=512 count=1 make a copy of MBR (Master Boot Record) to floppy [english]
Description not available for this language[German?]
# dd if=/dev/fd0 of=/dev/hda bs=512 count=1 restore MBR from backup copy saved to floppy [english]
Description not available for this language[German?]
# dump -0aj -f /tmp/home0.bak /home make a full backup of directory '/home' [english]
Description not available for this language[German?]
# dump -1aj -f /tmp/home0.bak /home make a incremental backup of directory '/home' [english]
Description not available for this language[German?]
# restore -if /tmp/home0.bak restoring a backup interactively [english]
Description not available for this language[German?]
# rsync -rogpav --delete /home /tmp synchronization between directories [english]
Description not available for this language[German?]
# rsync -rogpav -e ssh --delete /home ip_address:/tmp rsync via SSH tunnel [english]
Description not available for this language[German?]
# rsync -az -e ssh --delete ip_addr:/home/public /home/local synchronize a local directory with a remote directory via ssh and compression [english]
Description not available for this language[German?]
# rsync -az -e ssh --delete /home/local ip_addr:/home/public synchronize a remote directory with a local directory via ssh and compression [english]
Description not available for this language[German?]
# tar -Puf backup.tar /home/user make a incremental backup of directory '/home/user' [english]
Description not available for this language[German?]
# ( cd /tmp/local/ && tar c . ) | ssh -C user@ip_addr 'cd /home/share/ && tar x -p' copy content of a directory on remote directory via ssh [english]
Description not available for this language[German?]
# ( tar c /home ) | ssh -C user@ip_addr 'cd /home/backup-home && tar x -p' copy a local directory on remote directory via ssh [english]
Description not available for this language[German?]
# tar cf - . | (cd /tmp/backup ; tar xf - ) local copy preserving permits and links from a directory to another [english]
Description not available for this language[German?]
 « TOP «

CDROM

Command Description
# cd-paranoia -B rip audio tracks from a CD to wav files [english]
Description not available for this language[German?]
# cd-paranoia -- rip first three audio tracks from a CD to wav files [english]
Description not available for this language[German?]
# cdrecord -v gracetime=2 dev=/dev/cdrom -eject blank=fast -force clean a rewritable cdrom [english]
Description not available for this language[German?]
# cdrecord -v dev=/dev/cdrom cd.iso burn an ISO image [english]
Description not available for this language[German?]
# gzip -dc cd_iso.gz | cdrecord dev=/dev/cdrom - burn a compressed ISO image [english]
Description not available for this language[German?]
# cdrecord --scanbus scan bus to identify the channel scsi [english]
Description not available for this language[German?]
# dd if=/dev/hdc | md5sum perform an md5sum on a device, like a CD [english]
Description not available for this language[German?]
# mkisofs /dev/cdrom > cd.iso create an iso image of cdrom on disk [english]
Description not available for this language[German?]
# mkisofs /dev/cdrom | gzip > cd_iso.gz create a compressed iso image of cdrom on disk [english]
Description not available for this language[German?]
# mkisofs -J -allow-leading-dots -R -V create an iso image of a directory [english]
Description not available for this language[German?]
# mount -o loop cd.iso /mnt/iso mount an ISO image [english]
Description not available for this language[German?]
 « TOP «

Networking (LAN / WiFi)

Command Description
# dhclient eth0 active interface 'eth0' in dhcp mode [english]
Description not available for this language[German?]
# ethtool eth0 show network statistics of eth0 [english]
Description not available for this language[German?]
# host www.example.com lookup hostname to resolve name to ip address and viceversa [english]
Description not available for this language[German?]
# hostname show hostname of system [english]
Description not available for this language[German?]
# ifconfig eth0 show configuration of an ethernet network card [english]
Description not available for this language[German?]
# ifconfig eth0 192.168.1.1 netmask 255.255.255.0 configure IP Address [english]
Description not available for this language[German?]
# ifconfig eth0 promisc configure 'eth0' in promiscuous mode to gather packets (sniffing) [english]
Description not available for this language[German?]
# ifdown eth0 disable an interface 'eth0' [english]
Description not available for this language[German?]
# ifup eth0 activate an interface 'eth0' [english]
Description not available for this language[German?]
# ip link show show link status of all network interfaces [english]
Description not available for this language[German?]
# iwconfig eth1 show wireless networks [english]
Description not available for this language[German?]
# iwlist scan wifi scanning to display the wireless connections available [english]
Description not available for this language[German?]
# mii-tool eth0 show link status of 'eth0' [english]
Description not available for this language[German?]
# netstat -tup show all active network connections and their PID [english]
Description not available for this language[German?]
# netstat -tupl show all network services listening on the system and their PID [english]
Description not available for this language[German?]
# netstat -rn show routing table alike "route -n" [english]
Description not available for this language[German?]
# nslookup www.example.com lookup hostname to resolve name to ip address and viceversa [english]
Description not available for this language[German?]
# route -n show routing table [english]
Description not available for this language[German?]
# route add -net 0/0 gw IP_Gateway configure default gateway [english]
Description not available for this language[German?]
# route add -net 192.168.0.0 netmask 255.255.0.0 gw 192.168.1.1 configure static route to reach network '192.168.0.0/16' [english]
Description not available for this language[German?]
# route del 0/0 gw IP_gateway remove static route [english]
Description not available for this language[German?]
# echo "1" > /proc/sys/net/ipv4/ip_forward activate ip routing [english]
Description not available for this language[German?]
# tcpdump tcp port 80 show all HTTP traffic [english]
Description not available for this language[German?]
# whois www.example.com lookup on Whois database [english]
Description not available for this language[German?]
 « TOP «

Microsoft Windows networks (samba)

Command Description
# mount -t smbfs -o username=user,password=pass //WinClient/share /mnt/share mount a windows network share [english]
Description not available for this language[German?]
# nbtscan ip_addr netbios name resolution [english]
Description not available for this language[German?]
# nmblookup -A ip_addr netbios name resolution [english]
Description not available for this language[German?]
# smbclient -L ip_addr/hostname show remote shares of a windows host [english]
Description not available for this language[German?]
# smbget -Rr smb://ip_addr/share like wget can download files from a host windows via smb [english]
Description not available for this language[German?]
 « TOP «

IPTABLES (firewall)

Command Description
# iptables -t filter -L show all chains of filtering table [english]
Description not available for this language[German?]
# iptables -t nat -L show all chains of nat table [english]
Description not available for this language[German?]
# iptables -t filter -F clear all rules from filtering table [english]
Description not available for this language[German?]
# iptables -t nat -F clear all rules from table nat [english]
Description not available for this language[German?]
# iptables -t filter -X delete any chains created by user [english]
Description not available for this language[German?]
# iptables -t filter -A INPUT -p tcp --dport telnet -j ACCEPT allow telnet connections to input [english]
Description not available for this language[German?]
# iptables -t filter -A OUTPUT -p tcp --dport http -j DROP block HTTP connections to output [english]
Description not available for this language[German?]
# iptables -t filter -A FORWARD -p tcp --dport pop3 -j ACCEPT allow POP3 connections to forward chain [english]
Description not available for this language[German?]
# iptables -t filter -A INPUT -j LOG --log-prefix Logging on input chain [english]
Description not available for this language[German?]
# iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE configure a PAT (Port Address Traslation) on eth0 masking outbound packets [english]
Description not available for this language[German?]
# iptables -t nat -A PREROUTING -d 192.168.0.1 -p tcp -m tcp --dport 22 -j DNAT --to-destination 10.0.0.2:22 redirect packets addressed to a host to another host [english]
Description not available for this language[German?]
 « TOP «

Monitoring and debugging

Command Description
# free -m displays status of RAM in megabytes [english]
Description not available for this language[German?]
# kill -9 process_id force closure of the process and finish it [english]
Description not available for this language[German?]
# kill -1 process_id force a process to reload configuration [english]
Description not available for this language[German?]
# last reboot show history reboot [english]
Description not available for this language[German?]
# lsmod display kernel loaded [english]
Description not available for this language[German?]
# lsof -p process_id display a list of files opened by processes [english]
Description not available for this language[German?]
# lsof /home/user1 displays a list of open files in a given path system [english]
Description not available for this language[German?]
# ps -eafw displays linux tasks [english]
Description not available for this language[German?]
# ps -e -o pid,args --forest displays linux tasks in a hierarchical mode [english]
Description not available for this language[German?]
# pstree Shows a tree system processes [english]
Description not available for this language[German?]
# smartctl -A /dev/hda monitoring reliability of a hard-disk through SMART [english]
Description not available for this language[German?]
# smartctl -i /dev/hda check if SMART is active on a hard-disk [english]
Description not available for this language[German?]
# strace -c ls >/dev/null display system calls made and received by a process [english]
Description not available for this language[German?]
# strace -f -e open ls >/dev/null display library calls [english]
Description not available for this language[German?]
# tail /var/log/dmesg show events inherent to the process of booting kernel [english]
Description not available for this language[German?]
# tail /var/log/messages show system events [english]
Description not available for this language[German?]
# top display linux tasks using most cpu [english]
Description not available for this language[German?]
# watch -n1 'cat /proc/interrupts' display interrupts in real-time [english]
Description not available for this language[German?]
 « TOP «

Others useful commands

Command Description
# alias hh='history' set an alias for a command - hh = history [english]
Description not available for this language[German?]
# apropos ...keyword display a list of commands that pertain to keywords of a program , useful when you know what your program does, but you don't know the name of the command [english]
Description not available for this language[German?]
# chsh change shell command [english]
Description not available for this language[German?]
# chsh --list-shells nice command to know if you have to remote into another box [english]
Description not available for this language[German?]
# gpg -c file1 encrypt a file with GNU Privacy Guard [english]
Description not available for this language[German?]
# gpg file1.gpg decrypt a file with GNU Privacy Guard [english]
Description not available for this language[German?]
# ldd /usr/bin/ssh show shared libraries required by ssh program [english]
Description not available for this language[German?]
# man ping display the on-line manual pages for example on ping command - use '-k' option to find any related commands [english]
Description not available for this language[German?]
# mkbootdisk --device /dev/fd0 `uname -r` create a boot floppy [english]
Description not available for this language[German?]
# wget -r www.example.com download an entire web site [english]
Description not available for this language[German?]
# wget -c www.example.com/file.iso download a file with the ability to stop the download and resume later [english]
Description not available for this language[German?]
# echo 'wget -c www.example.com/files.iso' | at 09:00 start a download at any given time [english]
Description not available for this language[German?]
# whatis ...keyword displays description of what a program does [english]
Description not available for this language[German?]
# who -a show who is logged on, and print: time of last system boot, dead processes, system login processes, active processes spawned by init, current runlevel, last system clock change [english]
Description not available for this language[German?]
 « TOP «

Translated by:
become translator!
Social Bookmarking
Bookmark to: Folkd Bookmark to: Yigg Bookmark to: Digg Bookmark to: Del.icio.us Bookmark to: Facebook Bookmark to: Reddit Bookmark to: StumbleUpon Bookmark to: Slashdot Bookmark to: Furl Bookmark to: Blinklist Bookmark to: Technorati Bookmark to: Newsvine Bookmark to: Blinkbits Information
 
 
Except where otherwise specified, the contents of LinuxCmd.org are licensed under License Creative Commons 2.5 Attribution
Free Distribution if provided Authors and, Not Commercial purposes and, Not Derivated Works 2.5
LinuxGuide.it | Terms of Use and License | Privacy Policies  Read Creative Commons license to learn how to share LinuxCmd.org contents using this license Our sponsors | Become sponsor
Logos and trademarks used for the link are owned the legitimate owners