Here is a handy listing of the most important startup and shutdown key combinations and related techniques, applicable to Macs running macOS Sierra and later. Instead of giving these by the keys used, I have ordered them by function, as that is how you will want to look them up.
To enter ‘modes’:
Safe mode (no third-party startups, flush caches) – Shift.
Local Recovery mode (Recovery partition, Disk Utility, System install) – Command-R requires a wired keyboard and trackpad/mouse.
Remote (latest) Recovery mode (online Recovery) – Command-Option-R requires a wired keyboard and trackpad/mouse.
Remote (original) Recovery mode (online Recovery, 10.12.4 and later only) – Command-Option-Shift-R requires a wired keyboard and trackpad/mouse.
These Recovery modes differ in their reinstall options.
Hardware Test/Diagnostics mode (run hardware diagnostics) – D requires a wired keyboard and trackpad/mouse.
Remote Hardware Test/Diagnostics (online) – Option-D requires a wired keyboard and trackpad/mouse.
Single-user mode (command line only, rarely useful now) – Command-S.
Verbose mode – Command-V.
Target disk mode (connected to ‘master’ Mac) – T.
To select startup:
Startup Manager, so you can choose startup volume – Option.
Boot from CD/DVD/USB stick – C.
Use OS X startup volume – X.
NetBoot – N.
Default image on NetBoot – Option-N.
Eject removable media (optical disk) – Eject key, F12, mouse button, trackpad button.
- iMac and desktops – shut down. Disconnect all peripheral cables. Disconnect mains power cable. Wait 15 seconds. Plug mains power cable back in. Wait a further 5 seconds before pressing Power button to start up.
- MacBook including Air and Pro with non-removable batteries – shut down. Connect and power mains adaptor. On built-in keyboard, press (left side) Shift-Control-Option and the power button, then release.
- Older portables with removable batteries – shut down. Remove power adaptor and battery. Press and hold Power button for 5 seconds. Reconnect battery and mains adaptor.
You should normally reset NVRAM after resetting the SMC.
To run sysdiagnose, which produces a large dump of diagnostic information for Apple (or third-party) analysis – Command-Option-Control-Shift-. (period).
To shut down, restart, or log out:
To force shut-down – press and hold Power button for 5 seconds, or until shuts down.
To close all apps and then force shutdown – Control-Option-Command-Power button, or Control-Option-Command-Eject.
To force restart – Control-Command-Power button.
To close all open apps and then force restart – Control-Command-Eject.
To log out normally – Shift-Command-Q.
To log out immediately – Option-Shift-Command-Q.
Other than a forced shutdown with the Power button, these vary according to model, and may not work following significant software or hardware problems.
Note: except in dire emergency, never turns the mains supply off, or disconnect the mains power cable, unless the (desktop) Mac is already shut down: force shutdown first by pressing and holding the Power button until the Mac shuts down.