Gratis omvandlare
Linux / Bash Command Cheat Sheet
Omfattande Linux- och Bash-kommandofuskblad. Sök i 80+ viktiga kommandon med exempel, beskrivningar och kopiera med ett klick.
ls
List directory contents
Exempel:
ls -la /home/userls -la
List all files including hidden, with details
Exempel:
ls -la ~/Documentscd
Change directory
Exempel:
cd /var/logpwd
Print working directory path
Exempel:
pwdmkdir
Create a new directory
Exempel:
mkdir -p /tmp/mydir/subdirrm
Remove files or directories
Exempel:
rm -rf /tmp/oldfilescp
Copy files or directories
Exempel:
cp -r /src/dir /dst/dirmv
Move or rename files/directories
Exempel:
mv oldname.txt newname.txttouch
Create an empty file or update timestamp
Exempel:
touch newfile.txtfind
Search for files in a directory hierarchy
Exempel:
find /home -name '*.log' -mtime -7locate
Find files by name using a prebuilt database
Exempel:
locate nginx.confln
Create hard or symbolic links
Exempel:
ln -s /path/to/target /path/to/linkdf
Report disk space usage of file systems
Exempel:
df -hdu
Estimate file space usage
Exempel:
du -sh /var/log/*stat
Display file or file system status
Exempel:
stat /etc/passwdfile
Determine file type
Exempel:
file /usr/bin/bashcat
Concatenate and display file contents
Exempel:
cat /etc/hostsless
View file content one screen at a time
Exempel:
less /var/log/syslogmore
View file content page by page
Exempel:
more /etc/passwdhead
Output the first part of a file
Exempel:
head -n 20 /var/log/auth.logtail
Output the last part of a file
Exempel:
tail -f /var/log/sysloggrep
Search text using patterns
Exempel:
grep -rn 'error' /var/log/sed
Stream editor for filtering and transforming text
Exempel:
sed 's/old/new/g' file.txtawk
Pattern scanning and text processing language
Exempel:
awk '{print $1, $3}' access.logsort
Sort lines of text files
Exempel:
sort -k2 -n data.txtuniq
Report or omit repeated lines
Exempel:
sort file.txt | uniq -cwc
Print newline, word, and byte counts
Exempel:
wc -l /etc/passwdcut
Remove sections from each line of files
Exempel:
cut -d: -f1 /etc/passwdtr
Translate or delete characters
Exempel:
echo 'hello' | tr 'a-z' 'A-Z'echo
Display a line of text
Exempel:
echo "Hello, World!"printf
Format and print data
Exempel:
printf "%s\t%d\n" name 42diff
Compare files line by line
Exempel:
diff file1.txt file2.txttee
Read from stdin and write to stdout and files
Exempel:
ls | tee output.txtps
Report a snapshot of current processes
Exempel:
ps aux | grep nginxtop
Display Linux processes in real time
Exempel:
top -u www-datahtop
Interactive process viewer (ncurses-based)
Exempel:
htopkill
Send a signal to a process
Exempel:
kill -9 1234killall
Kill processes by name
Exempel:
killall firefoxbg
Resume a suspended job in the background
Exempel:
bg %1fg
Bring a job to the foreground
Exempel:
fg %1jobs
List active jobs in the current shell
Exempel:
jobs -lnohup
Run a command immune to hangups
Exempel:
nohup ./script.sh &nice
Run a command with modified scheduling priority
Exempel:
nice -n 10 ./heavy_task.shsystemctl
Control the systemd system and service manager
Exempel:
systemctl restart nginxservice
Run a System V init script
Exempel:
service apache2 statusping
Send ICMP ECHO_REQUEST to network hosts
Exempel:
ping -c 4 google.comcurl
Transfer data from or to a server
Exempel:
curl -L -o file.zip https://example.com/file.zipwget
Non-interactive network downloader
Exempel:
wget -q https://example.com/file.tar.gzssh
OpenSSH remote login client
Exempel:
ssh -i ~/.ssh/key.pem user@hostscp
Secure copy files between hosts
Exempel:
scp user@host:/path/file.txt ./local/rsync
Remote file copying tool with delta transfer
Exempel:
rsync -avz /src/ user@host:/dst/netstat
Print network connections and routing tables
Exempel:
netstat -tulpnss
Utility to investigate sockets
Exempel:
ss -tulwnifconfig
Configure a network interface
Exempel:
ifconfig eth0ip
Show and manipulate routing, devices, and tunnels
Exempel:
ip addr shownmap
Network exploration tool and port scanner
Exempel:
nmap -sV 192.168.1.0/24dig
DNS lookup utility
Exempel:
dig +short A google.comnslookup
Query Internet name servers interactively
Exempel:
nslookup example.comchmod
Change file mode bits (permissions)
Exempel:
chmod 755 script.shchown
Change file owner and group
Exempel:
chown -R www-data:www-data /var/wwwchgrp
Change group ownership
Exempel:
chgrp developers project/sudo
Execute a command as another user (superuser)
Exempel:
sudo systemctl restart nginxsu
Change user ID or become superuser
Exempel:
su - postgrespasswd
Change user password
Exempel:
passwd usernameumask
Set or display the file mode creation mask
Exempel:
umask 022id
Print user and group information
Exempel:
id usernamewhoami
Print the current effective user name
Exempel:
whoamigroups
Print the groups a user is in
Exempel:
groups usernametar
Archive files using tape archive format
Exempel:
tar -czvf archive.tar.gz /path/to/dirtar -x
Extract files from a tar archive
Exempel:
tar -xzvf archive.tar.gz -C /target/gzip
Compress files using GNU zip
Exempel:
gzip -9 large_file.loggunzip
Decompress gzip compressed files
Exempel:
gunzip archive.tar.gzzip
Package and compress files into a ZIP archive
Exempel:
zip -r output.zip /path/to/dirunzip
Extract files from a ZIP archive
Exempel:
unzip archive.zip -d /target/bzip2
Compress files using bzip2 algorithm
Exempel:
bzip2 -z large_file.txtxz
Compress files using the XZ algorithm
Exempel:
xz -z -9 file.txtuname
Print system information
Exempel:
uname -auptime
Tell how long the system has been running
Exempel:
uptimefree
Display amount of free and used memory
Exempel:
free -hlscpu
Display information about the CPU architecture
Exempel:
lscpulsblk
List information about block devices
Exempel:
lsblk -o NAME,SIZE,TYPE,MOUNTPOINTlspci
List all PCI devices
Exempel:
lspci -v | grep VGAdmesg
Print or control the kernel ring buffer
Exempel:
dmesg | tail -50journalctl
Query and display messages from the journal
Exempel:
journalctl -u nginx --since '1 hour ago'history
Display the command history list
Exempel:
history | grep dockerenv
Print environment variables
Exempel:
env | grep PATHif / then / fi
Conditional execution in shell scripts
Exempel:
if [ -f file.txt ]; then echo exists; fifor
Loop over a list of items
Exempel:
for i in 1 2 3; do echo $i; donewhile
Execute commands while a condition is true
Exempel:
while read line; do echo $line; done < filecase
Multi-branch conditional matching pattern
Exempel:
case "$var" in a) echo A;; b) echo B;; esacfunction
Define a shell function
Exempel:
greet() { echo "Hello, $1!"; }; greet Worldexport
Set environment variables for child processes
Exempel:
export MY_VAR=valuesource
Execute commands from a file in current shell
Exempel:
source ~/.bashrcalias
Create an alias for a command
Exempel:
alias ll='ls -la'cron / crontab
Schedule commands to run periodically
Exempel:
crontab -e # 0 * * * * /path/to/script.shat
Execute commands at a specified time
Exempel:
echo 'ls /tmp' | at 14:30Relaterade verktyg
Visa alla verktygGit-kommandon Fuskblad
Omfattande Git-kommandofuskblad. Sök i 80+ väsentliga Git-kommandon med exempel, beskrivningar och en-klickskopia.
Docker-kommandon Fuskblad
Omfattande Docker-kommandofuskblad. Sök i 70+ viktiga Docker-kommandon med exempel, beskrivningar och en-klick-kopiering.
Vim-kommandon Fuskblad
Omfattande Vim-kommandofuskblad. Sök i 80+ väsentliga Vim-kommandon med exempel, beskrivningar och kopiera med ett klick.
SQL Formatterare & Förskönare
Formatera, försköna och rensa SQL-frågor direkt i din webbläsare. Ingen uppladdning krävs – helt privat och gratis.