Essential terminal reference — 102+ commands
Showing all commands
ls -lals -lhcd /path/to/dircd -pwdmkdir -p dir1/dir2/dir3cp -r source/ dest/mv old_name new_namerm -rf directory/touch file.txtln -s target link_namefind / -name "*.log" -mtime +7find . -type f -size +100Mfind . -name "*.tmp" -deletetree -L 2du -sh *df -hcat file.txtless file.txthead -20 file.txttail -f /var/log/syslogwc -l file.txtdiff file1 file2sort file.txt | uniq -c | sort -rnawk '{print $1, $3}' file.txtsed -i 's/old/new/g' file.txtcut -d',' -f1,3 data.csvgrep -r "pattern" /path/grep -i "pattern" file.txtgrep -n "pattern" file.txtgrep -v "pattern" file.txtgrep -c "pattern" file.txtgrep -E "pat1|pat2" file.txtwhich commandlocate filenamechmod 755 script.shchmod +x script.shchmod -R 644 /path/chown user:group filechown -R user:group /dir/ps auxps aux | grep nginxtophtopjobsbg %1 / fg %1lsof -i :8080nohup command &curl -s https://api.example.comwget -O output.zip https://example.com/file.zipping -c 4 google.comtraceroute google.comnslookup domain.comdig domain.comss -tulnpip addr showssh user@hostscp file.txt user@host:/path/rsync -avz src/ user@host:/dest/tar -czf archive.tar.gz dir/tar -xzf archive.tar.gztar -tf archive.tar.gzzip -r archive.zip dir/unzip archive.zipgzip file.txtgunzip file.txt.gzuname -ahostnameuptimefree -hlsblkwhoamidateenvsystemctl start nginxsystemctl stop nginxsystemctl restart nginxsystemctl status nginxsystemctl enable nginxjournalctl -u nginx -fjournalctl --since "1 hour ago"apt update && apt upgradeapt install packageapt remove packageapt search keywordyum install packagesnap install app!!Ctrl+Rhistory | tail -20command1 | command2command > file.txtcommand >> file.txtcmd1 && cmd2cmd1 || cmd2alias ll='ls -la'crontab -ecrontab -l*/5 * * * * /path/script.sh0 2 * * * /path/backup.sh0 0 * * 0 /path/weekly.sh@reboot /path/startup.sh