macOS Terminal – How to Quit an App Using Terminal

command linemacosterminal

I want to quit certain applications on my Mac using Terminal. For example, how do I kill “Slack”? Do I need its PID number?

Best Answer

No, you do not need to know its PID.

You can use:

pkill -x Slack

Or:

killall Slack

Note: Be sure to read the manual page for whichever command you choose to use, in order to see the various options available to the command, as may be relevant to its particular usage. In Terminal type e.g. man pkill and press enter, or just type the command and right-click on it, then select: Open man Page