How to force a Mac to restart without pressing the power key

rebootssh

The Finder was not responding, so I control+click'd the Finder icon on the Dock and chose Relaunch… except that it didn't relaunch.

Activity Monitor happened to be visible and I could see that it listed Finder (including the PID) and showed it as "Not Responding."

I was in iTerm, so I tried killall Finder and was told "No processes belonging to you were found" (or words to that effect).

I tried to send "kill" to the PID I could see for Finder, and was told there was no such PID. This led me to assume that the WindowServer was not showing accurate information anymore.

I tried sudo killall -HUP WindowServer which made the entire GUI go away, and left me with a black screen and some white letters on it (not the panic screen, more like console log messages).

The message was:

Sep 27 17:17:23 Pro kernel[0]: V1.4.0: TrustedData_driver_VendorSpecificType00::vendorSpecificPassThroughIn(): SendCommand failed, task not complete, serviceResponse = 1, TaskStatus: 2

Sep 27 17:17:23 Pro kernel[0]: V1.4.0: TrustedData_UserClient_SCSIType00::vendorSpecificPassThroughIn() returning failure from driver: 3758097084

So now I have a black screen, but and I can type but it has no effect (the letters appear on the screen, but don't actually execute. I've tried control-C and control-Z to no avail.

I can ssh into it from my other Mac.

Of course my first step was sudo shutdown -r now which sent out the notice that the system was going to shutdown, but didn't.

I have also tried sudo shutdown -ro now and sudo /sbin/reboot and sudo reboot -q to no avail.

Aside: (On a Windows PC, I would have pressed CTRLALTDEL but there is no corresponding Mac keyboard shortcut… not that it would have necessarily worked anyway.)

I am out of ideas.

I ran ps and put the output here if anyone wants to see what is still running.

What else would you try?

(Other than simply holding down the power button until it shuts off.)

Best Answer

  • ssh onto your Mac
  • Type sudo su -l to switch to superuser mode
  • Enter your admin password
  • type halt and hit enter

This sends SIGTERM (and subsequently SIGKILL) to all running processes and powers the system off.

Note: Type man halt for other options.

EDIT: You could also try launchctl shutdown