5

The difference between kill and killall

I tried kill command as

$ kill "PDF Expert"
-bash: kill: PDF Expert: arguments must be process or job IDs

It report error,
However, when test with

$ killall "PDF Expert"

The application "PDF Expert" was closed.

What's the difference between them?

Sow
  • 51
  • 1
  • 2
  • Do you think that this answer is a satisfactory explanation of the difference between `kill` and `killall`: https://askubuntu.com/questions/271028/killall-doesnt-kill-all-and-rarely-kills-what-is-the-command-for-then/271032#271032? – karel Apr 08 '18 at 16:37
  • 4
    Is the answer not already present in the question? *arguments must be process or job IDs* – TRiG Apr 08 '18 at 16:38
  • 1
    `whatis kill killall` – Cyrus Apr 08 '18 at 16:57
  • kill will terminate a single process, killall , as the name implies, will kill all processes of the name given. See https://linuxconfig.org/kill-vs-killall-difference-and-command-usage for details. – Panther Apr 08 '18 at 17:11
  • Have you tried reading the documentation? `man kill` and `man killall` – glenn jackman Apr 08 '18 at 19:32
  • [How can I get help on terminal commands?](https://askubuntu.com/q/991946/507051) – dessert Apr 08 '18 at 21:35

1 Answers1

2

Kill works by process ID but, Killall can determine process by process ID it means if you give process name instead of process id you killall might find the process id and kill it.

YaserMow
  • 189
  • 1
  • 1
  • 11