Linux Process Management

Managing processes and jobs

View Processes

ps # show current processes
ps aux # show all processes
ps -ef # full format listing
top # interactive process viewer
htop # enhanced interactive viewer

Process Search

pgrep process-name # find process ID by name
ps aux | grep process-name # search processes

Kill Processes

kill PID # terminate process
kill -9 PID # force kill (SIGKILL)
kill -15 PID # graceful termination (SIGTERM)
killall process-name # kill all by name
pkill process-name # kill by pattern

Background Jobs

command & # run in background
jobs # list background jobs
fg # bring job to foreground
bg # resume job in background
Ctrl+Z # suspend current job

Process Priority

nice -n 10 command # start with priority
renice 10 -p PID # change priority

System Monitoring

uptime # system uptime and load
free -h # memory usage
vmstat # virtual memory statistics