Managing Linux Processes: ps, top, kill, and Signals
Learn how to view, monitor, and control Linux processes using ps, top, htop, kill, nice, and other process management tools and signals.
Every running program on a Linux system is a process — an instance of an executable with its own memory space, file descriptors, and system resources. The kernel assigns each process a unique Process ID (PID) and tracks its state, priority, CPU usage, and memory consumption. Knowing how to list, inspect, and control processes lets you diagnose runaway applications, gracefully restart services, and tune system performance without rebooting.
Run tasks in the background or move them between the foreground and background without opening a new terminal session.
command & # run in backgroundjobs # list background jobsfg %1 # bring job 1 to foregroundbg %1 # resume job 1 in backgroundnohup command & # persist after logout
1
Start a job in the background
Append & to any command to run it without blocking your shell prompt.
2
Check running jobs
Run jobs to list all background and suspended jobs in the current shell session, along with their job numbers.
3
Move jobs between foreground and background
Press Ctrl+Z to suspend the current foreground process, then use bg %N to resume it in the background or fg %N to bring it back to the foreground.
4
Persist jobs after logout
Prefix your command with nohup (and append &) so it keeps running even after you close the terminal or disconnect an SSH session.
Linux schedules processes using a priority value called “niceness,” ranging from -20 (highest priority) to 19 (lowest priority). The default niceness is 0.
nice -n 10 command # start with lower priorityrenice 5 -p 1234 # change running process priority
For processes managed by systemd (web servers, databases, cron jobs, etc.), use systemctl commands instead of kill and nice. Commands like sudo systemctl restart nginx and sudo systemctl status postgresql give you structured control and logging through the journal.