Processes
Main Commands
Section titled “Main Commands”Command | Description | Example |
---|---|---|
ps aux | List all processes | ps aux |
top | Display real-time process activity | top |
htop | Enhanced, interactive process viewer | htop |
kill | Terminate a process by its PID | kill 1234 |
kill -9 | Force immediate termination of a process | kill -9 1234 |
Practical Example
Section titled “Practical Example”- Run
top
to view activity. - Identify the PID of a process.
- Use
kill <PID>
to terminate it.
Best Practices
Section titled “Best Practices”- Prefer a simple
kill
before usingkill -9
. - Use
htop
for easier process management. - Double-check the PID before killing a process.