Linux: Killall command

It is your responsibility to ensure safe usage of these commands, improper usage could cause damage to services and file systems. We will not be held responsible.

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

killall httpd

Kill all proccesses running under the user “postfix”

killall -u postfix

Kill a specific process but its full path

killall /usr/libexec/postfix/master

Command not found?

It does not always come pre-installed, it’s simple to install.

Ubuntu / Debian

apt-get install psmisc

RHEL – Red hat / Fedora / CentOS

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 a pkill Unices.
  • pstree – Shows currently running processes in a tree format.
  • peekfd – Peek at file descriptors of running processes.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.