File & Directory Management

  • ls -la – list all files with permissions
  • pwd – print working directory
  • cd /path – change directory
  • mkdir newdir – create directory
  • rm file.txt – remove file
  • touch file.txt – create empty file
  • cp source dest – copy file
  • mv old new – move or rename

Viewing & Searching

  • cat file.txt – display full content
  • less largefile.log – paginated view
  • head -n 20 file.txt – first 20 lines
  • tail -f logfile – follow live log
  • grep "error" app.log – search pattern
  • find /home -name "*.conf" – find files

Process Management

  • ps aux – list all processes
  • kill -9 PID – force kill process
  • top – live process monitor

Permissions & Ownership

  • chmod 755 script.sh – change mode
  • chown user:group file – change owner
  • sudo – execute as superuser

Disk & System Info

  • df -h – disk free (human readable)
  • du -sh /home – disk usage summary

Networking & Transfer

  • ssh user@host – secure shell
  • wget https://example.com/file.zip – download file
  • curl -O https://example.com/file.zip – download

Archiving

  • tar -cvf archive.tar /folder – create tar
  • tar -xvf archive.tar – extract tar

Aliases & Shell

  • alias ll='ls -la' – create shortcut
  • echo "Hello" – print string
  • exit – close shell

📚 Quick Reference Table

CommandFull Form / Purpose
lsList Segments
pwdPrint Working Directory
cdChange Directory
mkdirMake Directory
rmRemove
touchTouch
cpCopy
mvMove
catConcatenate
lessLess
headHead
tailTail
grepGlobal Regular Expression Print
findFind
manManual
sudoSuperUser Do
dfDisk Filesystem
duDisk Usage
psProcess Status
killKill
tarTape Archive
chmodChange Mode
chownChange Owner
sshSecure Shell
wgetWorld Wide Web Get
curlClient URL
topTable of Processes
aliasAlias
echoEcho
exitExit
Back to Cloud Security