Many people use the Mac for months without restarting or shutting down. However, it always a good habit to properly logout or shut down your Mac. This not only helps to save power but also keep your Mac in healthy condition. Good part is that you can shut down, restart, logout and put your Mac to sleep mode using multiple methods. In this article, we will cover some of the popular ways to do all these stuffs so that you can pick the one that works for your style.
Shut Down, Restart, Log Out and Sleep in Mac
There are two options to consider before shutting down and trigger other actions in Mac. One is to forcefully close all the apps and shut down without any prompt. Make sure you save all your work before force shutdown or restart the Mac. Second is to show a confirmation prompt when you trigger closing down of your Mac. This is useful to remind you if you have wrongly triggered the action and allows you to save your work.
1. From Apple Menu
If you are a menu follower, then this option is for you. Simply click on the Apple logo showing on top left corner of your Mac. You will see a list of menu items including Shut Down, Restart, Sleep, Lock Screen and Log Out options. Click on the menu to trigger an action as per your need. Sleep and Lock Screen options are harmless and trigger the actions immediately without any prompt. All your open windows will be available when you wake or unlock the screen. However, other options like Shut Down, Restart and Logout will close all your open applications. To avoid losing unsaved work, Mac will show you a prompt allowing 60 seconds delay before trigger the action.
You can cancel the action if you have wrongly triggered or want to save any open documents. Otherwise, leave the prompt to shut down / restart / log out after 60 seconds or click on shut down / restart / log out button to trigger the action immediately without waiting.
2. Using Power Button and Keyboard Combinations
Next option is to use the power button which you can use to toggle the sleep mode in Mac. Alternatively, press and hold the power button to view the shut down prompt like below. You can click one of the buttons in the prompt or cancel the action.
As per Apple support guide, there are also many keyboard shortcuts with power button combination to trigger shut down, restart or log out action. You can test the shortcuts that work for you and use when needed.
|Command + Option + Power||Sleep|
|Control + Shift + Power||Display sleep|
|Control + Power||Show shut down prompt to choose an action|
|Command + Control + Power||Force restart without prompt|
|Command + Control + Option + Power||Close all apps and shut down|
|Command + Control + Q||Lock screen|
|Command + Shift + Q||Log out with prompt|
|Command + Option + Shift + Q||Log out without prompt|
3. Creating Custom Shortcut
If you are not convenient in using one of the keyboard shortcuts, you can create custom keyboard shortcut for shut down, restart or log out.
- Click Apple menu and choose “System Preferences…” option.
- Click on “Keyboard” and go to “Shortcuts” tab.
- Select “App Shortcuts” and then click on the + button to add new shortcut.
- On the pop-up that appears, enter the menu title as exactly it appears in the Apple menu. For example, we enter “Shut Down…” and then choose the shortcuts as “Option + 4”.
- Click add button to create a new shortcut for shut down.
- Now, check the Apple menu and you will see the new shortcut is assigned to the “Shut Down…” menu.
There are two things to note when using this method. One is that the menu has two “Shut Down” items as you can see. Other is that it will trigger the shut down without any prompt. You can create custom shortcuts for restart, lock screen ad log out menu items also.
4. Using Terminal
If you love to use command line interface, it is super easy to trigger shut down, restart and log out actions. There are multiple commands available for this purpose. You need to use sudo for running some of these commands as a superuser. Otherwise, you will see an error in the Terminal showing as “NOT Super-user”.
- Shut down immediately without prompt.
sudo shutdown -h now
- Schedule shut down after 10 minutes. You can replace 10 with any number of minutes to trigger automatic shutting down of your Mac.
sudo shutdown -h +10
- Shut down instantly.
- Shut down without prompt.
osascript -e 'tell app "System Events" to shut down'
- Shut down showing the default prompt with 60 seconds delay.
osascript -e 'tell app "loginwindow" to «event aevtrsdn»'
- Restart without prompt.
osascript -e 'tell app "System Events" to restart'
- Restart Mac with default prompt.
osascript -e 'tell app "loginwindow" to «event aevtrrst»'
- Log out without confirmation.
osascript -e 'tell app "System Events" to «event aevtrlgo»'
- Log out with confirmation.
osascript -e 'tell app "System Events" to log out'
- Put Mac to sleep instantly.
- Put the display to sleep.