Linux: Killall command
There is a number way of killing processes on a Linux based OS, killall is one of these methods. It’s always good to be ready to kill an unwanted process or a rogue process which is eating resources.
Usage
Kill all instances of the “httpd” process
1 |
killall httpd |
Kill all proccesses running under the user “postfix”
1 |
killall -u postfix |
Kill a specific process but its full path
1 |
killall /usr/libexec/postfix/master |
Command not found?
It does not always come pre-installed, it’s simple to install.
Ubuntu / Debian
1 |
apt-get install psmisc |
RHEL – Red hat / Fedora / CentOS
1 |
yum install psmisc |
This package also contains the following useful programs:
fuser
– identifies what processes are using files.killall
– kills a process by its name, similar to apkill
Unices.pstree
– Shows currently running processes in a tree format.peekfd
– Peek at file descriptors of running processes.