killaprocess
no way to compare when less than two revisions
Differences
This shows you the differences between two versions of the page.
— | killaprocess [2013/01/28 04:29] (current) – created - external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | ====== Kill Linux Processes Easier with pkill ====== | ||
+ | |||
+ | One of the best features in Linux is the way you can control processes from the command line, so if you have an application that locks up your GUI, you can always SSH over from another machine and just kill the offending process. | ||
+ | |||
+ | The problem is that if you are killing the same process repeatedly, it& | ||
+ | |||
+ | **The Old Way** | ||
+ | |||
+ | The classic way of killing processes meant you& | ||
+ | < | ||
+ | |||
+ | $ ps -ef | grep swiftfox< | ||
+ | </ | ||
+ | |||
+ | Then to kill the process, you& | ||
+ | < | ||
+ | |||
+ | $ kill 7206 | ||
+ | </ | ||
+ | |||
+ | **The New Way** | ||
+ | |||
+ | Instead of going through all of that, you can simply use the pkill command if you already know the process name or part of it. | ||
+ | < | ||
+ | |||
+ | $ pkill swiftfox | ||
+ | </ | ||
+ | |||
+ | It& | ||
+ | If you want to see what process names are matched before using the pkill command, you can use the pgrep command. Passing the -l switch tells pgrep to show the process name as well. | ||
+ | < | ||
+ | |||
+ | $ pgrep -l swiftfox< | ||
+ | </ | ||
+ | |||
+ | Swiftfox seems to crash on me a lot, so I& | ||
+ | |||
+ | -- Main.FredPettis - 2012-05-29 | ||
killaprocess.txt · Last modified: 2013/01/28 04:29 by 127.0.0.1