Back in the day, when I was starting out with linux, I learned the basic linux
commands, grep, ps, ls, cd, pwd, cat, etc. I also learned about a little
command called "killall", which works like the "kill" command, except it takes
the name of a process and kills it, instead of having to look up its PID. What
they didn't tell me, was that this command, at least how it works, is specific
to Linux and the BSDs. When I got a shell account on a Solaris box a few years
later, I had to use the "killall" command, and was surprised to find out that
it didn't exist. I did a bit of digging, and found out that "killall" on
Solaris, and many other "old" unix systems like HPUX, etc, really does KILL ALL
PROCESSES, and is used in the system shutdown sequence. I have since learned
about another command, pkill, the companion to pgrep, that works almost exactly
the same as "killall"(in fact, it has even more options than killall) and works
on every system I have ever tried it on. And you know what, if you read the
linux manpage on killall, it even says that it may not have the desired effect
on non-linux systems.
References:
Solaris killall
manpage
HPUX killall
manpage
Linux killall
manpage
Linux pkill
manpage