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
topto view activity. - Identify the PID of a process.
- Use
kill <PID>to terminate it.
Best Practices
Section titled “Best Practices”- Prefer a simple
killbefore usingkill -9. - Use
htopfor easier process management. - Double-check the PID before killing a process.