Killing programs in mac or linux

To kill all instances of an application us the command killall

It can be tedious to find all the processes you are trying to kill based on process id. There is a cool little command that can do the work for you, killall.

You can kill all instances of a misbehaving program:

$sudo killall discord

Or you can kill using wild cards:

$sudo killall node*

If you want to check what you will kill you can use the command:

$ps aux | grep node*