Home > Wiki Tips

Using the Killall Command on macOS to Terminate Applications

Updated on Tuesday, December 3, 2024

iBoysoft author Amanda Wong

Written by

Amanda Wong
Professional tech editor

Approved by

Jessica Shee

English Français Deutsch やまと Español Português

Summary: This post explains the killall command on macOS. After reading it, you can understand the command and learn how to run it in Terminal to terminate applications on Mac.

mac kill all command

If you're a Mac user and need to quit an unresponsive application or process quickly, the killall command in the Terminal is a powerful tool to have in your arsenal. Here's an overview of how to use this command effectively on macOS.

What is the Mac killall command?

killall is a command-line utility that allows you to terminate processes by name. Unlike the traditional kill command, which requires a process ID (PID) to kill a process on Mac, killall works by simply referencing the name of the application or process you want to stop.

The syntax is below, you need to replace <AppName> with the name of the application or process you wish to terminate.

killall <AppName> 

For example, if you want to forcefully quit the Firefox browser, you would use:

killall Firefox

This command sends a termination signal to all processes related to Safari, effectively quitting the application.

How to use killall in macOS?

If you decide to use the killall command to force quit applications on Mac, you can follow the steps below:

Step 1: Find the Terminal by navigating to Applications > Utilities > Terminal, or simply search for it using Spotlight.

Step 2: Type the following command, replacing <AppName> with the name of the application you want to quit:

killall <AppName>

Example: To quit Safari, you would type:

killall Safari 

killall safari

 Note: The application name is case-sensitive, so ensure the capitalization is correct.

If the application is unresponsive, killall sends a signal to the app to terminate it. It's like a force quit but through the Terminal. 

You can also use the "-9" option to forcefully kill a stubborn process: 

killall -9 <AppName>

Example: 

killall -9 Firefox 

This sends a SIGKILL signal, which immediately stops the process without allowing it to clean up or save work.

When to use the killall command?

You can apply the killall command when you need to

  • Force Quit Unresponsive Apps: If an app becomes unresponsive and you can't close it through the usual method (Apple menu > Force Quit), you can use killall to quickly terminate it.
  • Automate Application Management: You can incorporate killall in scripts to automate the management of processes. For example, shutting down a set of apps at the end of the day or before running a system maintenance task.
  • Terminate Background Processes: Some apps run in the background (like Dropbox or Google Drive), and killall can be used to quit them if they're causing issues.

Conclusion

The killall command is a simple yet effective way to terminate processes or quit applications on macOS using the Terminal. Whether you're dealing with an unresponsive app or automating tasks, killall is a valuable command for Mac users to quickly regain control over the system. Always ensure you use it with caution to avoid unexpected data loss or issues.

Share the Mac killall command with people who need it!