Process Management

Monitor and control running processes in Linux.

1. ps

ps aux

Displays running processes with details.

2. top

top

Real-time view of processes and system usage.

3. htop

htop

Improved interactive version of top (requires installation).

4. kill

kill PID

Sends a signal to terminate a process by PID.

5. killall

killall firefox

Terminates all processes by name.

6. nice

nice -n 10 command

Starts a process with adjusted priority.

7. renice

renice -n 5 -p PID

Changes priority of a running process.

8. bg

bg

Resumes a suspended job in the background.

9. fg

fg

Brings a background job to the foreground.

10. jobs

jobs

Lists background jobs started in the current session.

11. pidof

pidof bash

Shows the PID of a running process.

12. pgrep

pgrep ssh

Searches for processes by name and returns their PID.

13. strace

strace -p PID

Traces system calls and signals of a process.

14. lsof

lsof -i :80

Lists open files and associated processes (e.g., network ports).

15. uptime

uptime

Displays system uptime and load averages.

16. systemctl status

systemctl status ssh

Shows the status of a systemd service.