Is there a way to list—and kill—running processes on Mac OS X in a Windows “Ctrl+Alt+Delete”-like way?

58

12

So, what do you do on a Mac when a process (as opposed to an application) is hogging CPU, swamping your machine, and you need to kill it?

I know you can use top or open “Applications > Utilities > Activity Monitor” and kill it from there.

But what happens when the process is already using so much CPU that doing either of those tasks is impossible?

On Windows, you can just do ctrl+alt+delete and the process list will reliably open. So no matter how much your computer is thrashing, you always have access to the list of processes.

On Mac OS, there’s cmd+alt+escape, which reliably shows running applications. Fine when it’s an application causing the problem. But: what do you do if it’s a process?

AP257

Posted 2010-09-24T07:35:49.520

Reputation: 583

@Bobby - it sounds like you've never worked on a Mac and had to use Force Quit. I'm pretty sure AP257 got it right. – jww – 2014-06-21T13:24:35.920

@noloader: Well, I've got no idea what I tried to say with that comment... – Bobby – 2014-06-21T13:26:44.643

@AP257 - another useful one Macs are missing is a way to quickly lock the Mac. Like Windows' Ctrl/Alt/Delete → Lock Workstation. – jww – 2014-06-21T13:27:58.863

4Sure. Cmd/Alt/Escape only shows applications: I want it to show all processes. – AP257 – 2010-09-24T08:53:17.887

Answers

40

Based on your desire to kill an individual process, I'm assuming that you are ok with a solution at the Terminal. The Terminal is pretty light so should be responsive even if your system is swamped, or if you're logging in via ssh.

Beyond the basic kill command, which kills processes via their pid (which you'd need to get from either a ps command, or the Activity monitor), a neat trick at the terminal is the killall command, which allows you to kill a process by name rather than pid.

For example, if you know the name of your process is my-prog-0 or whatever, you can go to the terminal and do:

% killall my-prog-0

There are a number of good options (see man killall for more info):

-s : Shows the kill commands that will be generated so you can be safe.
-u : Limits to a specified user

One thing to note about OS X is that some system processes will be automatically restarted if they are killed by the launchd daemon (I think??). For example, if the Dock is not responsive you can do a killall Dock and it will restart automatically.

dtlussier

Posted 2010-09-24T07:35:49.520

Reputation: 1 985

Why is the 0 necessary? – IgorGanapolsky – 2016-04-22T14:44:00.430

A '0' is not necessary. It was included in the answer because it is typical that processes have numbers in their name. The important thing is to match the name of the process you want to kill. – dtlussier – 2016-04-23T18:48:12.583

Thanks for the detailed answer and suggestions, even though it doesn't really solve the problem. Terminal can take a few minutes to start up if the machine is trashing.... and by the time it's started up, the mystery background process has usually gone away... Thanks anyway. – AP257 – 2010-09-25T11:45:47.733

If that's the case then I'm not sure there's much to be done, other than figuring out what causes this thrashing process to occur and then avoiding these conditions. – dtlussier – 2010-09-25T17:39:19.170

@dtlussier Typical that processes have numbers in their name? I've never seen that, well, ever. What applications are you speaking of? – SilverWolf - Reinstate Monica – 2019-03-04T03:37:01.860

25

Force Quit is the alternative to Task Manager on Mac. It's fast, efficient, and kills applications really fast.

You can access this feature through two ways.

  1.  Apple Icon (on the top left corner of the screen)--> Force Quit...
  2. Hold Alt/Option +  Apple/Command + Escape. This can be useful if you memorised the keyboard command and in the rare case that Finder misbehaves and freezes along it too.

JFW

Posted 2010-09-24T07:35:49.520

Reputation: 2 094

3Yes, it kills applications. That's my point! There's a background process on my machine that sometimes causes the machine to slow down massively. Force Quit doesn't show it. – AP257 – 2010-09-25T11:46:36.257

Activity Monitor can be used to show all processes and kill them through there. You can quit them or force quit them within the application. – JFW – 2010-09-26T13:06:19.207

10

Try the following command in terminal to list and search for process using a regex:-

ps gx | grep 'Symantec'

The above example is to list all the 'Symantec' related processes. Replace 'Symantec' with your own phrase. Next use variations of 'kill' command. You can either use:-

kill pid

Replace 'pid' with actual process id. Or use,

killall

as suggested before. To reiterate another useful suggestion, use

man kill

to see the manual for 'kill' command and also scroll down and see related commands which is mentioned under, "SEE ALSO" section.

Amit

Posted 2010-09-24T07:35:49.520

Reputation: 201

8

The is no process killing keyboard shorcut, only for running applications. The only way to kill processes is through Activity Monitor or through Terminal using UNIX commands.

Madison S

Posted 2010-09-24T07:35:49.520

Reputation: 1 440

3

Go to activity monitor, find the dock and highlight it. Hit the kill button (Stopsign with X in it, top left).

Force Quit is used for simple applications, while the activity monitor can be used to kill processes.

Alex

Posted 2010-09-24T07:35:49.520

Reputation: 41

2

Use Activity Monitor to find the Process you want to kill Look at the PID Using Terminal type Kill PID number and then return.

This assumes you have admin or sudu access

Steve Walker

Posted 2010-09-24T07:35:49.520

Reputation: 21

1

Why not select the process and hit the "Force a process to quit" button on the top left corner?

– Arjan – 2014-12-31T20:51:26.973