I am familiar with
kill command , and most of the time we just use kill -9 to kill a process forcefully , there are many other signals that can be used with
kill. But i wonder what are the use cases of
killall , if there is already a kill command.
killall use the
kill command in their implementation? I mean they are just wrappers over
kill or they have their own implementation?
I would also like to know how
pgrep command get the process id from process name.
Do all these commands use the same underlying system calls? Is there any difference from performance point of view , which one is faster?