kill

You can kill a process by its name

Supplementary instructions

pkill command can kill the process according to the process name. The application methods of pkill and killall are similar, they also directly kill the running program; if you want to kill a single process, please use kill to kill it.

grammar

pkill(options)(parameters)

Options

-o: Send signal only to the smallest (starting) process number found;
-n: Send signal only to the largest (ending) process number found;
-P: Specify the parent process number to send the signal;
-g: Specify the process group;
-t: Specifies the terminal to start the process.

Parameters

Process name: Specify the process name to be found, and also supports matching patterns similar to the grep command.

Example

pgrep -lgaim
2979 gaim

pkill gaim

In other words: kill corresponds to PID, and pkill corresponds to command.