killall: command not found on Debian — How to Install It (psmisc)
Sometimes you need the killall command — to stop all processes with the same name — and Debian replies killall: command not found. That means you have to install it first.

In short: killall is part of the psmisc package. Install it and the command appears.
How to install killall on Debian and Ubuntu
apt install psmisc
Run it as root (or with sudo). On CentOS and Fedora the package has the same name:
yum install psmisc
The psmisc package also includes other handy tools: pstree — a process tree, and fuser — which processes hold a file or a port.
How to use killall
killall nginx killall -9 php-fpm killall -u www-data
killall nginx— stop all nginx processes (TERM signal, the process shuts down cleanly);killall -9 …— kill forcibly (KILL) if a process hangs and doesn’t respond;killall -u user— stop all of a user’s processes.
An alternative without installing anything: pkill
If you don’t want to install a package, there’s pkill from the procps package, which is usually already there:
pkill nginx
The difference is that pkill matches part of the name, while killall matches the exact process name. So be careful with pkill: pkill php will stop php-fpm and any other process with “php” in its name.