How to Lock a Mac

Protect your data with this Mac lock screen shortcut and other options

Security is a vital concern if you store any sensitive data on your Mac or in your iCloud storage. There are a lot of in-depth Mac security measures that you can take, but the first, and most important, is to set an account password and lock your Mac when you aren't using it. This simple measure ensures that nobody will be able to access your local or iCloud data by simply using your Mac when you aren't looking.

Ways to Lock a Mac

There are a number of ways to lock a Mac, but they all require you to set up user passwords for all the accounts on your Mac first. Once that's done, you have these options:

  • Automatic inactivity timer: This is an important method, because it kicks in if you are called away from your Mac unexpectedly or just forget to lock it. Whenever your Mac enters sleep mode, or the screen saver activates, the screen will either lock immediately or after the amount of time you choose.
  • Keyboard shortcut: This method is essential, as it's extremely fast and you can activate it at any time. The downside is you have to memorize a key combination.
  • Apple menu: This is a good fallback method, as you don't need to memorize a key combination. The option to lock your screen is always located conveniently in the Apple menu.
  • Hot corners: This method allows you to set it so that your screen locks when you move your mouse cursor into one of the four corners of your screen. If you're already using all four hot corners for other things, then you won't be able to use this method.

These methods work for all Macs, but there are additional ways to lock a MacBook Pro that has a touchbar.

Check Your Password and Login Settings First

Before you can lock your Mac, you need to make sure it's actually possible to lock it. If your Mac is set to log in automatically, or your account has no password set, then you won't be able to lock your Mac until these issues have been addressed.

Follow these steps to check and verify your password and login settings, and then enable an inactivity-based lock if you so desire:

  1. Click the Apple icon in the upper left corner, and select System Preferences.

    A screenshot of the macOS desktop.
  2. Click Security & Privacy.

    A screenshot of macOS system preferences.
  3. If there is no check mark next to Disable automatic login, click the box next to it.

    A screenshot of Security and Privacy settings on Mac.
  4. If there is a check mark next to Disable automatic login, and you see the A login password has been set for this user message near the top of the window, your Mac is ready to lock.

    A screenshot of Security and Privacy settings on macOS.
  5. If you want to set a time-based inactivity lock, click the box next to Require password. If you don't, skip to the next section for additional locking options.

    A screenshot of Security and Privacy settings on macOS.
  6. Click the selection box where it says 5 minutes.

    A screenshot of setting an automatic lock on Mac.

    The box may have a different time value or the word immediate if someone has customized this setting in the past.

  7. Select the amount of time you would like to pass before your screen locks. Whenever your Mac is put to sleep or the screen saver activates, it will lock after this amount of time has passed.

    A screenshot of setting a time out limit for Mac.
  8. Your Mac will now lock automatically when sleeping and when the screen saver is active. For other methods of locking your Mac, continue to the next section.

How to Lock a Mac Using Shortcut Keys

If your user account has a password associated with it, and your Mac doesn't have automatic login turned on, then you can instantly lock your Mac at any time using an easy key combination. When you press these keys together, the lock screen will appear, and nobody will be able to access your Mac without putting in the correct password.

To instantly lock your Mac, simply press and hold Control + Command + Q, and release the keys after the lock screen appears. This is the fastest an easiest way to lock your Mac as long as you can remember the combination.

Be careful not to press Command + Q without first pushing and holding Control, as Command + Q alone will instantly shut down your currently active program.

Lock Your Mac Using the Apple Menu

If you have trouble remembering shortcut combinations, you can also lock your Mac quite easily from the Apple menu.

  1. Click the Apple menu icon in the upper left corner of the screen.

    The macOS desktop.
  2. Click Lock Screen.

    A screenshot of locking a Mac using the Apple menu.
  3. Your Mac will immediately switch to the lock screen.

Lock Your Mac Using Hot Corners

The other way to easily lock any Mac is to set up your hot corners. This feature allows you to set an action to occur whenever you move your mouse cursor into one of the four corners of your screen. There are a lot of options, and one is to immediately lock the screen.

  1. Click the Apple icon in the upper left of the screen, and select System Preferences.

    A screenshot of the Apple menu on a Mac.
  2. Click Desktop & Screen Saver.

    A screenshot of System Preferences on a Mac.
  3. Click Screen Saver in the center top portion of the window.

    A screenshot of Desktop and Screen Saver settings on a Mac.
  4. Click Hot Corners in the bottom right of the window.

    A screenshot of Screen Saver settings on a Mac.
  5. Click the drop-down menu that corresponds with your desired corner.

    A screenshot of hot corner settings on a Mac.
  6. Select Lock Screen, and click OK.

    A screenshot of turning on hot corner screen lock on a Mac.
  7. Your Mac will now lock whenever you move your mouse into the corner that you chose.