How to Lock Your Mac When You’re Away

Tired of your kids or roommate posting dumb things to your Facebook account every time you leave the room? All you have to do lock your Mac to keep them out.

When you lock your Mac, you can only unlock it with your password—or your thumbprint if you’ve got a new MacBook Pro with a Touchbar. There are several ways to lock your Mac. You can have it lock automatically when your display goes to sleep. You can lock it with a keyboard shortcut. Or, if you’ve got a Touchbar, you can even add a custom lock button there. Here’s how to do all of this, and more!

Lock Your Mac When Your System is Idle

To get started, open System Preferences and head to the “Security & Privacy” section. On the “General” tab, select the “Require password…after sleep or screen saver begins” option. Set the associated dropdown menu to “immediately.”

When you bring your Mac out of sleep or from the screen saver, it will now require your password for access. To adjust how long it takes for your Mac’s display to go to sleep, head to the “Energy Saver” section in System Preferences. Here, you can set whatever times you want for when your Mac and display go to sleep.

Note that if you’re using a MacBook, you’ll need to set times separately for when the MacBook is using the battery or the power adapter.

Lock Your Mac With a Keyboard Shortcut

If you don’t want to wait for your Mac to go to sleep, you can quickly lock your Mac with a simple keyboard shortcut. If you’re using a newer Mac where the Power button is a key, just press Control+Shift+Power. If you’re using an older Mac with an optical drive, press Control+Shift+Eject instead. Just like that, your Mac will be locked.

Lock Your Mac Using the Touchbar

If you’re using the latest MacBook Pro with Touchbar, you can add a dedicated button for locking your Mac. Head to System Preferences > Keyboard, then click the “Customize Control Strip” button.

Drag the Lock Screen button off the bottom of your screen and onto your Touchbar. You can put the button in the collection of four buttons that are always on the screen, or in the expanded keyset—whichever works for you.

Lock Your Mac Using Hot Corners

Hot Corners is one of those features Mac users either love or ignore completely. If you like the feature, you can use it to lock your screen. First, ensure that your screen is set to lock when the system is idle, as we covered previously. Then, head to System Preferences > Mission Control and click the “Hot Corners” button.

Here, you can set any corner to “Put Display to Sleep.” If you have your system set to lock with the screensaver, you could also set the hot corner to activate the screensaver instead. It’s entirely up to you. Either way, your Mac will be locked when you trigger this corner.

Lock Your Screen From the Menu Bar

If you have your system set to lock when it goes to sleep, you might also want to add a button to your menu bar that activates sleep. Head to Applications > Utilities > Keychain Access. From the “Keychain Access” menu, select the “Preferences” command.

In the “Preferences” window, check the “Show keychain status in menu bar” option.

You’ll now see a lock icon on your menu bar. Click it and you’ll see the option to lock your screen.

You can also use this menu to lock and unlock keychains, of course, but the ability to lock your Mac is a nice addition.

Justin Pot is a staff writer for How-To Geek, and a technology enthusiast who lives in Hillsboro, Oregon. Follow him on Twitter and Facebook, if you want. You don't have to.