click below
click below
Normal Size Small Size show me how
Process Management
Process Management & Tremination Commands
Start a process in the background, leaving the shell available for other commands | Command & |
The terminal from which a process is invoked is unusable (no other commands can run) until the process terminates | Runs in the foreground |
View the active jobs and see the job ID | jobs |
jobs Facts: | job ID specific to the terminal session Each terminal has its own set of jobs Jobs from one terminal cannot be managed from a second terminal using job ID numbers |
Send a job to the background | bg [job ID] |
Bring a job to the foreground | fg [job ID] |
Pause a job (send to background) and give it a job ID number | Ctrl+z |
Start a command with a higher or lower priority | nice |
nice value range (highest - lowest priority) | 19 (lowest priority) - -20 (highest priority) |
Specify a priority (with nice command) | nice -n e.g. nice -n 7 gedit |
Default nice value (if no value specified with nice command) | -10 |
Default nice value for processes NOT executed with the nice command | 0 (Zero) |
Assign a NEW priority to a process that has already started using the PID of the process | renice |
renice Options: Specifies a priority (but assumed by default) | renice -n |
renice Options: Specify a user (root only | renice -u |
renice Options: Specify a group (root only) | renice -g |
Lower the priority of all processes owned by user userbob to 5 below the default (zero) | renice 5 -u userbob |
User who can change the default of other users and groups or raise a process priority above the default (Zero) | root |
Allow a command or shell script to continue running in the background after logging out form the shell | nohup e.g. nohup gedit & |
Terminate a process using a process ID (PID) and a specific --- signal | kill |
Stops and Restarts the process with the same process ID number - also causes process to reload its configuration file | SIGHUP. -1 e.g. kill -1 6552 kill -SIGHUP 6552 |
Send an INTERRUPT signal to the process (same as using Ctrl+c) | SIGINT, -2 |
Invoke a HARD kill - may not allow process to unhook its resources - RAM and other resources allocated to the process usually remain allocated to the process | SIGKILL, -9 |
Stop the process after allowing it to unhook its resources (default kill command if no signal is specified | SIGTERM, -15 |
List all signals available to the kill command | kill -l |
Terminate a process using the process name (can also use the SIGNAL commands) | killall e.g. killall sshd |
Elevate the kill command to highest PRIORITY ( -20) and then invoke a hard kill to stop the process 6754 | kill -n20 6754 |
Kill a GUI object - (when run curser changes to an X, which is then used to click on the application you want to kill) | xkill |
Start a process with a high priority of -10 (must be root | nice --10 |