macOS Terminal
A library of terminal commands for macOS.
Note: These terminal commands have not been tested on Apple Silicon Macs, so some may not work on those models. Additionally, newer macOS versions may render some commands incompatible as Apple updates or deprecates them.
1. Shut down your Mac. Once it’s powered off, press and hold the power button until you see the “Loading startup options” screen.
2. Select "Options," then click "Continue." If prompted, enter your login password.
Press and hold Command + R while booting your Mac.
1. Shut down your Mac.
2. Press the power button, then quickly press and hold Command + Option + R.
3. Keep holding the keys until you see a spinning globe and the message "Starting Internet Recovery. This may take a while."
4. Connect to a Wi-Fi network, then wait for the Mac to boot into Internet Recovery. This may take some time, so be patient.
For Apple Silicon Macs, Internet Recovery is now integrated into the standard Recovery Mode.
Press and hold Option + Command + R.
Press: Shift + Option + Command + R
1. Unplug the Mac from the charger and remove peripherals.
2. Press and hold Shift + Control + Option and the power button for ten seconds.
3. Let go of all keys and reconnect the charger.
4. After all 3 steps, press the power button to boot your Mac.
1. Press and hold Command, Option (or Alt), P, and R, keys at once and turn on the device. Make sure to hold down the keys until the Mac restarts again. Better still, let it reboot twice. Then, release the keys at once. Now, your Mac should restart normally if the issue is with the NVRAM / PRAM.
1. Shut down your Mac completely.
2. Press and hold the power button until the “Loading startup options” screen appears.
3. Select your startup volume, then hold the shift key, then click “Continue in Safe Mode.” After this, the Mac will now boot into Safe Mode.
If you’re unsure whether your Mac started up in safe mode, you can use the System Information app to check the mode:
1. On your Mac, press and hold the Option key, then click the Apple logo, and open the “System Information” app.
2. In the app, select Software in the sidebar.
3. In the System Software Overview, look at the value listed next to the item labeled Boot Mode. There are 2 modes “Safe: The Mac is using safe mode.” “Normal: The Mac is not using safe mode.”
1. Shut down your Mac completely.
2. Power it on and immediately press and hold the Shift key.
3. Keep holding until the login window appears.
4. Log in — you may be prompted to log in twice.
5. Look for “Safe Boot” in the menu bar on either login screen to confirm you're in Safe Mode.
If you’re unsure whether your Mac started up in safe mode, you can use the System Information app to check the mode:
1. On your Mac, press and hold the Option key, then click the Apple logo, and open the “System Information” app.
2. In the app, select Software in the sidebar.
3. In the System Software Overview, look at the value listed next to the item labeled Boot Mode. There are 2 modes “Safe: The Mac is using safe mode.” “Normal: The Mac is not using safe mode.”