Kostenloser Konverter

Linux / Bash Befehls-Spickzettel

Umfassender Spickzettel für Linux- und Bash-Befehle. Durchsuchen Sie über 80 wichtige Befehle mit Beispielen, Beschreibungen und Kopien mit einem Klick.

ls
List directory contents
Beispiel:ls -la /home/user
ls -la
List all files including hidden, with details
Beispiel:ls -la ~/Documents
cd
Change directory
Beispiel:cd /var/log
pwd
Print working directory path
Beispiel:pwd
mkdir
Create a new directory
Beispiel:mkdir -p /tmp/mydir/subdir
rm
Remove files or directories
Beispiel:rm -rf /tmp/oldfiles
cp
Copy files or directories
Beispiel:cp -r /src/dir /dst/dir
mv
Move or rename files/directories
Beispiel:mv oldname.txt newname.txt
touch
Create an empty file or update timestamp
Beispiel:touch newfile.txt
find
Search for files in a directory hierarchy
Beispiel:find /home -name '*.log' -mtime -7
locate
Find files by name using a prebuilt database
Beispiel:locate nginx.conf
ln
Create hard or symbolic links
Beispiel:ln -s /path/to/target /path/to/link
df
Report disk space usage of file systems
Beispiel:df -h
du
Estimate file space usage
Beispiel:du -sh /var/log/*
stat
Display file or file system status
Beispiel:stat /etc/passwd
file
Determine file type
Beispiel:file /usr/bin/bash
cat
Concatenate and display file contents
Beispiel:cat /etc/hosts
less
View file content one screen at a time
Beispiel:less /var/log/syslog
more
View file content page by page
Beispiel:more /etc/passwd
head
Output the first part of a file
Beispiel:head -n 20 /var/log/auth.log
tail
Output the last part of a file
Beispiel:tail -f /var/log/syslog
grep
Search text using patterns
Beispiel:grep -rn 'error' /var/log/
sed
Stream editor for filtering and transforming text
Beispiel:sed 's/old/new/g' file.txt
awk
Pattern scanning and text processing language
Beispiel:awk '{print $1, $3}' access.log
sort
Sort lines of text files
Beispiel:sort -k2 -n data.txt
uniq
Report or omit repeated lines
Beispiel:sort file.txt | uniq -c
wc
Print newline, word, and byte counts
Beispiel:wc -l /etc/passwd
cut
Remove sections from each line of files
Beispiel:cut -d: -f1 /etc/passwd
tr
Translate or delete characters
Beispiel:echo 'hello' | tr 'a-z' 'A-Z'
echo
Display a line of text
Beispiel:echo "Hello, World!"
printf
Format and print data
Beispiel:printf "%s\t%d\n" name 42
diff
Compare files line by line
Beispiel:diff file1.txt file2.txt
tee
Read from stdin and write to stdout and files
Beispiel:ls | tee output.txt
ps
Report a snapshot of current processes
Beispiel:ps aux | grep nginx
top
Display Linux processes in real time
Beispiel:top -u www-data
htop
Interactive process viewer (ncurses-based)
Beispiel:htop
kill
Send a signal to a process
Beispiel:kill -9 1234
killall
Kill processes by name
Beispiel:killall firefox
bg
Resume a suspended job in the background
Beispiel:bg %1
fg
Bring a job to the foreground
Beispiel:fg %1
jobs
List active jobs in the current shell
Beispiel:jobs -l
nohup
Run a command immune to hangups
Beispiel:nohup ./script.sh &
nice
Run a command with modified scheduling priority
Beispiel:nice -n 10 ./heavy_task.sh
systemctl
Control the systemd system and service manager
Beispiel:systemctl restart nginx
service
Run a System V init script
Beispiel:service apache2 status
ping
Send ICMP ECHO_REQUEST to network hosts
Beispiel:ping -c 4 google.com
curl
Transfer data from or to a server
Beispiel:curl -L -o file.zip https://example.com/file.zip
wget
Non-interactive network downloader
Beispiel:wget -q https://example.com/file.tar.gz
ssh
OpenSSH remote login client
Beispiel:ssh -i ~/.ssh/key.pem user@host
scp
Secure copy files between hosts
Beispiel:scp user@host:/path/file.txt ./local/
rsync
Remote file copying tool with delta transfer
Beispiel:rsync -avz /src/ user@host:/dst/
netstat
Print network connections and routing tables
Beispiel:netstat -tulpn
ss
Utility to investigate sockets
Beispiel:ss -tulwn
ifconfig
Configure a network interface
Beispiel:ifconfig eth0
ip
Show and manipulate routing, devices, and tunnels
Beispiel:ip addr show
nmap
Network exploration tool and port scanner
Beispiel:nmap -sV 192.168.1.0/24
dig
DNS lookup utility
Beispiel:dig +short A google.com
nslookup
Query Internet name servers interactively
Beispiel:nslookup example.com
chmod
Change file mode bits (permissions)
Beispiel:chmod 755 script.sh
chown
Change file owner and group
Beispiel:chown -R www-data:www-data /var/www
chgrp
Change group ownership
Beispiel:chgrp developers project/
sudo
Execute a command as another user (superuser)
Beispiel:sudo systemctl restart nginx
su
Change user ID or become superuser
Beispiel:su - postgres
passwd
Change user password
Beispiel:passwd username
umask
Set or display the file mode creation mask
Beispiel:umask 022
id
Print user and group information
Beispiel:id username
whoami
Print the current effective user name
Beispiel:whoami
groups
Print the groups a user is in
Beispiel:groups username
tar
Archive files using tape archive format
Beispiel:tar -czvf archive.tar.gz /path/to/dir
tar -x
Extract files from a tar archive
Beispiel:tar -xzvf archive.tar.gz -C /target/
gzip
Compress files using GNU zip
Beispiel:gzip -9 large_file.log
gunzip
Decompress gzip compressed files
Beispiel:gunzip archive.tar.gz
zip
Package and compress files into a ZIP archive
Beispiel:zip -r output.zip /path/to/dir
unzip
Extract files from a ZIP archive
Beispiel:unzip archive.zip -d /target/
bzip2
Compress files using bzip2 algorithm
Beispiel:bzip2 -z large_file.txt
xz
Compress files using the XZ algorithm
Beispiel:xz -z -9 file.txt
uname
Print system information
Beispiel:uname -a
uptime
Tell how long the system has been running
Beispiel:uptime
free
Display amount of free and used memory
Beispiel:free -h
lscpu
Display information about the CPU architecture
Beispiel:lscpu
lsblk
List information about block devices
Beispiel:lsblk -o NAME,SIZE,TYPE,MOUNTPOINT
lspci
List all PCI devices
Beispiel:lspci -v | grep VGA
dmesg
Print or control the kernel ring buffer
Beispiel:dmesg | tail -50
journalctl
Query and display messages from the journal
Beispiel:journalctl -u nginx --since '1 hour ago'
history
Display the command history list
Beispiel:history | grep docker
env
Print environment variables
Beispiel:env | grep PATH
if / then / fi
Conditional execution in shell scripts
Beispiel:if [ -f file.txt ]; then echo exists; fi
for
Loop over a list of items
Beispiel:for i in 1 2 3; do echo $i; done
while
Execute commands while a condition is true
Beispiel:while read line; do echo $line; done < file
case
Multi-branch conditional matching pattern
Beispiel:case "$var" in a) echo A;; b) echo B;; esac
function
Define a shell function
Beispiel:greet() { echo "Hello, $1!"; }; greet World
export
Set environment variables for child processes
Beispiel:export MY_VAR=value
source
Execute commands from a file in current shell
Beispiel:source ~/.bashrc
alias
Create an alias for a command
Beispiel:alias ll='ls -la'
cron / crontab
Schedule commands to run periodically
Beispiel:crontab -e # 0 * * * * /path/to/script.sh
at
Execute commands at a specified time
Beispiel:echo 'ls /tmp' | at 14:30

Über dieses Tool

Eine umfassende Kurzanleitung für Linux Bash. Durchsuchen Sie häufig verwendete Befehle, Syntax und Beispiele, geordnet nach Kategorien. Durchsuchbar und mobilfreundlich – setzen Sie ein Lesezeichen für diese Seite, um sofort darauf zuzugreifen, wenn Sie eine schnelle Erinnerung benötigen.

So verwenden Sie es

  1. Durchsuchen Sie die kategorisierten Referenzabschnitte.
  2. Verwenden Sie die Suchleiste, um bestimmte Befehle oder Syntaxen zu finden.
  3. Klicken Sie auf einen Eintrag, um Anwendungsbeispiele und Erklärungen anzuzeigen.
  4. Kopieren Sie Befehle direkt zur Verwendung in Ihrem Terminal oder Editor.

Häufig gestellte Fragen

Ist diese Referenz aktuell?
Die Referenz deckt weit verbreitete Befehle und Syntax ab, die in allen Versionen stabil sind. Informationen zu den neuesten Ergänzungen oder versionspezifischen Funktionen finden Sie in der offiziellen Dokumentation.
Kann ich das offline nutzen?
Nach dem Laden funktioniert die Seite ohne Internetverbindung. Setzen Sie ein Lesezeichen für den schnellen Zugriff – alle Inhalte werden im Browser ohne weitere Netzwerkanfragen gerendert.
Ist das umfassend oder nur die Grundlagen?
Es deckt die am häufigsten verwendeten Befehle und Muster ab, die 90 % der alltäglichen Aufgaben erledigen. Informationen zu Nischen- oder erweiterten Funktionen finden Sie in der offiziellen Dokumentation.
Kann ich Ergänzungen vorschlagen?
Wir aktualisieren regelmäßig unsere Referenzen. Wenn Ihnen fehlende Befehle auffallen oder Sie Vorschläge haben, teilen Sie uns dies über unsere Kontaktseite mit.