| Command | Purpose | Example
|
| --------- | ------------------------------------------------ |
----------------------------------------- |
| `pwd` | Print Working Directory (show current directory) | `pwd` →
`/home/taajrmen` |
| `ls` | List files/folders | `ls -la` (show
hidden and detailed) |
| `cd` | Change directory | `cd /var/log` or
`cd ..` to go up |
| `mkdir` | Make directory | `mkdir projects`
|
| `touch` | Create empty file | `touch file.txt`
|
| `cp` | Copy files/directories | `cp file.txt /tmp`
|
| `mv` | Move or rename | `mv file.txt
file2.txt` |
| `rm` | Remove files/directories | `rm file.txt` or
`rm -r folder` |
| `cat` | Show file content | `cat file.txt`
|
| `less` | View file interactively | `less
/var/log/messages` |
| `head` | Show first lines | `head -n 10
file.txt` |
| `tail` | Show last lines (great for logs) | `tail -f
/var/log/messages` (follow live) |
| `echo` | Display text or variables | `echo $HOME`
|
| `man` | Open manual page | `man ls`
|
| `which` | Find command location | `which python3`
|
| `chmod` | Change permissions | `chmod +x
script.sh` |
| `chown` | Change owner | `chown taajrmen
file.txt` |
| `df` | Disk free space | `df -h` (human-
readable) |
| `du` | Disk usage | `du -sh *`
|
| `ps` | Show running processes | `ps aux`
|
| `kill` | Kill process by PID | `kill 1234`
|
| `top` | Interactive system monitor | `top` or `htop`
(better, install) |
| `uname` | Show system info | `uname -a`
|
| `date` | Show or set date/time | `date`
|
| `history` | Show command history | `history`
|
| `clear` | Clear screen | `clear` or
`Ctrl+L` |
.File System Hierarchy Basics
/ — root directory
/home — user home directories
/etc — system config files
/var — variable data like logs
/usr — user programs, libraries
/bin and /sbin — essential binaries and system binaries
/tmp — temporary files
Understanding this helps navigate and locate files.