One linux command every day (43): killall command

Source: Internet
Author: User
Tags touch command
One linux command every day (43): killall command link: One linux command every day (1): ls command http://www.2cto.com/os/201210/163049.html ; One linux command every day (2): cd command http://www.2cto.com/os/201210/163050.html Every day, a linux command (43): killall command link: A linux command (1) every day: ls command http://www.2cto.com/os/201210/163049.html ; One linux command every day (2): cd command http://www.2cto.com/os/201210/163050.html ; One linux command every day (3): pwd command http://www.2cto.com/os/201210/163462.html ; One linux command every day (4): mkdir command http://www.2cto.com/os/201210/163463.html ; One linux command every day (5): rm command http://www.2cto.com/os/201210/163662.html ; One linux command (6) every day: rmdir command http://www.2cto.com/os/201210/164017.html ; One linux command (7) every day: mv command http://www.2cto.com/os/201210/164247.html ; One linux command every day (8): cp command http://www.2cto.com/os/201210/164254.html ; One linux command every day (9): touch Command http://www.2cto.com/os/201211/165699.html ; One linux command every day (10): cat command http://www.2cto.com/os/201211/165989.html ; One linux command every day (11): nl command http://www.2cto.com/os/201211/165990.html One linux command every day (12): more command http://www.2cto.com/os/201211/165994.html One linux command every day (13): less command http://www.2cto.com/os/201211/165998.html One linux command every day (14): head Command http://www.2cto.com/os/201211/166191.html One linux command every day (15): tail command http://www.2cto.com/os/201211/168702.html One linux command every day (16): which command http://www.2cto.com/os/201211/168890.html A linux command (17) every day: whereis command http://www.2cto.com/os/201211/168893.html One linux command (18) every day: locate command http://www.2cto.com/os/201211/168895.html One linux command every day (19): find command overview http://www.2cto.com/os/201211/168897.html One linux command every day (20): find command exec http://www.2cto.com/os/201211/168901.html One linux command (21) every day: find command xargs http://www.2cto.com/os/201211/168903.html A linux command (22) every day: detailed description of the parameters of the find Command http://www.2cto.com/os/201211/168912.html A linux command (23) every day: Linux directory structure http://www.2cto.com/os/201211/170430.html One linux command every day (24): Linux file type and extension http://www.2cto.com/os/201211/170431.html One linux command every day (25): Explanation of linux file attributes http://www.2cto.com/os/201211/170434.html One linux command every day (26): use SecureCRT to upload and download files http://www.2cto.com/os/201211/172022.html One linux command every day (27): linux chmod command http://www.2cto.com/os/201211/172028.html One linux command every day (28): tar command http://www.2cto.com/os/201212/172641.html One linux command (29) every day: chgrp command http://www.2cto.com/os/201212/172983.html One linux command every day (30): chown command http://www.2cto.com/os/201212/173239.html A linux command (31) every day:/etc/group file details http://www.2cto.com/os/201212/174429.html One linux command (32) every day: gzip command http://www.2cto.com/os/201212/174431.html One linux command every day (33): df command http://www.2cto.com/os/201212/174434.html One linux command every day (34): du command http://www.2cto.com/os/201212/174701.html One linux command (35) every day: ln command http://www.2cto.com/os/201212/174993.html One linux command (36) every day: diff command http://www.2cto.com/os/201212/176333.html One linux command (37) every day: date Command http://www.2cto.com/os/201212/176335.html One linux command (38) every day: cal command http://www.2cto.com/os/201212/176337.html One linux command (39) every day: grep command http://www.2cto.com/os/201212/177059.html One linux command every day (40): wc command http://www.2cto.com/os/201212/177343.html One linux command every day (41): ps command http://www.2cto.com/os/201212/177665.html One linux command every day (42): kill Command http://www.2cto.com/os/201212/177686.html The killall command in Linux is used to kill a process named by name ). We can use the kill command to kill the process of the specified process PID. if we want to find the process we want to kill, we also need to use the ps command and then use grep to find the process, killall combines these two processes into one, which is a very useful command. Www.2cto.com 1. command format: killall [parameter] [process name] 2. command: used to end all processes with the same name. command parameter:-Z only kills processes with scontext.-e requires that the process name be matched.-I ignores lowercase-g to kill the process group, instead of process-I interaction mode, before killing a process, ask the user-l to list all the known signal names-q does not output warning information-s sends the specified signal-v reports whether the signal is successfully sent-w waits for the process to die-help display help information -- version display version Display 4. use instance: www.2cto.com instance 1: killall command: killall vi output: [root @ localhost ~] # Ps-ef | grep viroot 17581 17398 0 00:00:00 pts/0 00:00:00 vi test.txt root 17611 17582 0 pts/1 grep vi [root @ localhost ~] # Ps-ef | grep viroot 17581 17398 0 00:00:00 pts/0 00:00:00 vi test.txt root 17640 17612 0 pts/2 vi test. logroot 17642 17582 0 00:00:00 pts/1 grep vi [root @ localhost ~] # Killall vi [root @ localhost ~] # Ps-ef | grep viroot 17645 17582 0 00:00:00 pts/1 grep vi description: instance 2: Send the specified signal command to the process: run the program in the background: vi & kill the vi process: killall-TERM vi or killall-KILL vi output: [root @ localhost ~] # Vi & [1] 17646 [root @ localhost ~] # Killall-TERM vi [1] + Stopped vi [root @ localhost ~] # Vi & [2] 17648 [root @ localhost ~] # Ps-ef | grep viroot 17646 17582 0 00:00:00 pts/1 00:00:00 viroot 17648 17582 0 00:00:00 pts/1 viroot 17650 17582 0 pts/1 grep vi [2] + Stopped vi [root @ localhost ~] # Killall-TERM vi [root @ localhost ~] # Ps-ef | grep viroot 17646 17582 0 00:00:00 pts/1 00:00:00 viroot 17648 17582 0 00:00:00 pts/1 viroot 17653 17582 0 pts/1 grep vi [root @ localhost ~] # Killall-KILL vi [1]-killed vi [2] + killed vi [root @ localhost ~] # Ps-ef | grep viroot 17656 17582 0 00:00:00 pts/1 grep vi [root @ localhost ~] # Note: instance 3: killall-9 bash command of killing www.2cto.com from all the logged-on shells: [root @ localhost ~] # W 18:01:03 up 41 days, 18:53, 3 users, load average: 0.00, 0.00, 0.00 user tty from login @ idle jcpu pcpu WHATroot pts/0 10.2.0.68 0.10 s 0.10 s-bashroot pts/1 10.2.0.68 0.00 s 0.02 s 0.00 s wroot pts/2 10.2.0.68 24 0.01 s 0.01 s-bash [root @ localhost ~] # Killall-9 bash [root @ localhost ~] # W 18:01:48 up 41 days, 18:54, 1 user, load average: 0.07, 0.02, 0.00 user tty from login @ idle jcpu pcpu WHATroot pts/0 10.2.0.68 01 0.00 s 0.01 s 0.00 s w [root @ localhost ~] # Note: After running the command: killall-9 bash, all bash will be dropped, so all current connections are lost. You need to reconnect and log on.
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.