| Command |
What it does |
pwd |
Print current directory |
ls -la |
List all files, including hidden, with details |
cd - |
Go back to the previous directory |
| Command |
What it does |
chmod 755 file |
rwx for owner, rx for group/others |
chown user:group file |
Change file owner and group |
| Command |
What it does |
ps aux |
List all running processes |
kill PID |
Ask a process to stop, so it can clean up first |
kill -9 PID |
Force-kill a process that ignored kill PID |
kill sends TERM, which lets a process close files and finish writes before
exiting. kill -9 sends KILL, which the process cannot catch: unsaved work and
open files are lost, and child processes can be left behind. Try kill PID first
and reach for -9 only when the process is still there.