Learn how to shutdown/ force shutdown Mac with keyboard commands or using Terminal. This guide is same for all Mac OS versions like Mac OS X Yosemite, Mavericks and Mountain Lion.
Way 1: Select Shutdown option from Apple menu (Quick way)
- Select Apple Menu -> Shutdown. (hold down Command key when you choose shutdown to avoid confirmation message box).
- It will popup a dialogue. Click Shutdown or Cancel.
If you don’t click any of the options, Â Mac computer will shutdown automatically after some minutes.
Way 2: Â Use Keyboard shortcut to Shutdown MacÂ
- Click the Control + Eject (or press and hold the Power button for 5 seconds). When a shutdown dialog box appears, click shutdown.
- When confirmation dialog box appears, press Return/Enter to shutdown, Â S to sleep and R to restart.
Way 3: Shutdown Mac using Terminal
Open Terminal app from Applications->Utilities folder and type the following command.
sudo shutdown -h now
Note: Terminal command uses  -h, -r or -s parameters to shut down, restart and sleep the Mac.
Way 4: Use iPhone app to remotely shutdown Mac computer.
iShutdown HD is a best app to do remotely shutdown, sleep, restart your Mac or PC. But it requires internet connection.
How to Force shutdown Mac
Do a force shutdown when your Mac suddenly freezes, hangs or not responding. Power button location is different in Mac Mini or iMac compared to MacBook Air and MacBook Pro.
- Press and hold the Power button to force shutdown mac that is not responding.
- Also use Control-Option-Command-Eject keys combination to force shutdown Mac.