rss feed Twitter Page Facebook Page Github Page Stack Over Flow Page

Commands for Process control

Commands for Process control

PID Bring a background or stopped process to the foreground.


PID Send the process to the background. This is the opposite of fg. The same can be accomplished with Ctrl z


Run any command in the background (the symbol & means run the command in the background?

any_command &

Force a process shutdown. First determine the PID of the process to kill using ps.

kill PID

Kill program(s) by name.

killall -9 program_name

Run program_name adjusting its priority. Since the priority is not specified in this example, it will be adjusted by 10 (the process will run slower), from the default value (usually 0). The lower the number (of niceness to other users on the system), the higher the priority. The priority value may be in the range -20 to 19. Only root may specify negative values. Use top to display the priorities of the running processes.

nice program_name

(as root) Change the priority of a running process to -1. Normal users can only adjust processes they own, and only up from the current value (make them run slower).

renice -1 PID