The KILL command is used to terminate the run of the specified process.
Sends the specified signal to the corresponding process. Not specifying a model will send Sigterm (15) to terminate the specified process. If the program can not be terminated with the "-kill" parameter, it sends a signal of Sigkill (9), which will force the end of the process, using the PS command or the jobs command to view the process number. The root user will affect the user's process, and non-root users can only affect their own processes.
Only the 9th signal (SIGKILL) can terminate the process unconditionally, other signal processes have the right to ignore. The following are commonly used signals:
HUP 1 terminal disconnection
INT 2 Interrupt (with Ctrl + C)
Quit 3 exit (with Ctrl + \)
Term 15 termination
Kill 9 Forced termination
CONT 18 Continuation (contrary to stop, FG/BG command)
Stop 19 paused (with Ctrl + Z)
Example 1 kill process
Kill-9 Process Number
Example 2 Deleting a process for a specified user
Kill-9 $ (ps-ef | grep peidalinux) kill-u Peidalinux
Note here that the INIT process cannot be killed. Init is one of the most indispensable programs in Linux system operation. The so-called Init process, which is a user-level process initiated by the kernel. After the kernel has booted itself (already loaded into memory, started running, and has initialized all device drivers and data structures, etc.), the boot process is completed by starting a user-level program init. As a result, Init is always the first process (its process number is always 1). All other processes are descendants of the INIT process. The init process is not to be killed!
The Killall command is used to kill a process with the specified name (kill processes by name)
Example 1 kill all top commands
sudo killall top
Reference Documentation:
Http://www.cnblogs.com/peida/archive/2012/12/20/2825837.html
Http://www.cnblogs.com/peida/archive/2012/12/21/2827366.html
Linux Command--kill Command &killall command