The Pkill command kills the process according to the process name. Pkill and Killall application methods are similar, but also directly kill the running program, if you want to kill a single process, kill it.
The Pkill command kills the process according to the process name. Pkill and Killall application methods are similar, but also directly kill the running program, if you want to kill a single process, kill it.
Grammar:
Pkill (option) (parameter)
Usage examples:
[Email protected] ~]# Pkill top
The PIDOF command is used to find the process ID number of the process with the specified name
[Email protected] ~]# pidof init1
Kill command:
Used to send signals to the process to achieve the management of the process;
Show current system available signals:
Kill-l [Signal]
There are three ways to identify each signal:
1) Digital identification of the signal;
2) The full name of the signal;
3) The abbreviated name of the signal;
Signal to process:
Kill [-S signal|-signal] pid ...
Common signals:
1) SIGHUP: No need to close the process and let it reread the configuration file;
2) SIGINT: Terminates the running process, which is equivalent to CTRL + C
9) SIGKILL: Kill the running process;
SIGTERM: Termination of the running process;
Sigcont):
SIGSTOP):
Killall command:
-Kill processes by name
Killall [-signal] Program
Linux System Job Control:
Job
Front-end operation (Foregroud): Through the terminal start, and after the start will occupy the terminal;
Background Job (Backgroud): Can be launched through the terminal, but after the boot into the background to run (release terminal);
How do I get my job running in the background?
(1) Operations in operation
CTRL + Z
Note: After sending to the backstage, the job will be switched to a stop state;
(2) Jobs that have not been started
# COMMAND &
Note: While this type of job is sent backstage, it is still relevant to the terminal, if you want to take the jobs sent back to the backend with the terminal relationship:
# Nohup COMMAND &
To view all jobs:
# jobs
Common commands to implement job control:
# FG [[%]job_num]: Bring the assigned assignment back to the foreground;
# BG [[%]job_num]: Let the job sent backstage continue to run in the background;
# Kill%job_num: Terminates the specified job;
This article from "Wang Liming" blog, declined reprint!
Several process-managed commands: Pkill,pidof,kill,killall,job