Chapter 7: Task Manager

Chapter 7: Process Management

Viewing Processes

ps aux | grep process
top
htop
pgrep nginx

Killing Processes

kill PID
kill -9 PID
killall nginx

Background Jobs

command &
jobs
fg %1
nohup command &

Cron Scheduling

crontab -e
crontab -l
# MIN HOUR DAY MON DOW cmd
0 2 * * * /backup.sh

Notes

  • Signals: SIGTERM=15, SIGKILL=9, SIGHUP=1
  • States: R=running S=sleeping Z=zombie