Quick Reference Table
Topic | Command | Purpose |
Current directory | Pwd | Show where you are |
List files | ls, ls -l, ls -a, ls -lh | View files and folders |
Change directory | Cd | Navigate between folders |
Create folder | Mkdir | Make a new directory |
Create file | Touch | Create an empty file |
Remove file | Rm | Delete files |
Remove folder | rmdir, rm -r | Delete directories |
Copy | Cp | Copy files/folders |
Move/Rename | Mv | Move or rename files |
View file | Cat | Display file contents |
View long file | Less | Scroll through files |
First lines | Head | Show beginning of a file |
Last lines | Tail | Show end of a file |
Search text | Grep | Find text inside files |
Find files | Find | Search for files/directories |
Search command | Which | Locate a command |
Clear terminal | Clear | Clear the screen |
Command history | History | View previous commands |
Execute program | ./program | Run executable files |
Permissions | Chmod | Change file permissions |
Owner | Chown | Change ownership |
Superuser | Sudo | Run commands as administrator |
Download | curl, wget | Download files or call APIs |
Processes | ps, top | View running processes |
Kill process | kill, killall | Stop programs |
Disk usage | df -h | Check disk space |
Folder size | du -sh | Check directory size |
Manual | Man | Read command documentation |
Help | –help | Get command usage |