In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces "the usage of Linux basic command killall". In daily operation, I believe many people have doubts about the usage of Linux basic command killall. The editor consulted all kinds of materials and sorted out simple and easy-to-use operation methods. I hope it will be helpful for you to answer the doubts about "the usage of Linux basic command killall"! Next, please follow the editor to study!
Killall
Killall can kill processes by name, and it sends messages to all processes with specified names. If no signal name is specified, SIGTERM is sent. The signal can be specified by a name (for example,-HUP or-SIGHUP) or a number (for example,-1) or the option-s. If the command name is not a regular expression (option-r) and contains a slash (/), the process that executes that particular file is selected, regardless of its name. If at least one process is killed for each listed command, or if no command is listed, and at least one process meets the-u and-Z search criteria, KILLALL returns a zero return code. Otherwise, KILLALL returns non-zero. The KILLALL process will never kill itself (but it may kill other KILLALL processes).
The scope of this command: RedHat, RHEL, Ubuntu, CentOS, SUSE, openSUSE, Fedora.
1. Grammar
Killall [options] name
2. List of options
Option
Description
-e |-- exact
The process needs to match the name exactly
-I |-- ignore-case
Ignore case
-g |-- process-group
End process group
-I |-- interactive
Ask before the end
-l |-- list
List all signal names
-Q |-- quite
When the process does not end, no information is output
-r |-- regexp
Interprets the process name pattern as an extended regular expression.
-s |-- signal
Send a specified signal
-u |-- user
End the process for the specified user
-v |-- verbose
Show detailed execution process
-w |-- wait
Waiting for all the processes to end.
-V |-- version
Display version information
-- help
Display help information
3. Examples
End all processes
[root@localhost ~] # ps / / View process, there are 3 wc processes
PID TTY TIME CMD
8266 pts/0 00:00:00 bash
9781 pts/0 00:00:00 wc
9784 pts/0 00:00:00 wc
9785 pts/0 00:00:00 wc
9786 pts/0 00:00:00 ps
[root@localhost ~] # killall-9 wc / / end all wc processes
[root@localhost ~] # ps / / View process, wc are all killed
PID TTY TIME CMD
8266 pts/0 00:00:00 bash
9788 pts/0 00:00:00 ps
[1] killed nice-n 19 wc
[2]-killed nice-n 19 wc
[3] + killed nice-n 19 wc
At this point, the study of "the usage of the Linux basic command killall" is over. I hope to be able to solve your doubts. The collocation of theory and practice can better help you learn, go and try it! If you want to continue to learn more related knowledge, please continue to follow the website, the editor will continue to work hard to bring you more practical articles!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.