≡ Menu

Apple OS X Lock Desktop / Screen

I need to prevent others using my desktop or laptop while I'm away from it. How do I lock my Laptop (Macbook or Macbook pro) / desktop using Mac OS X operating systems without using 3rd party applications?

You can lock your screen with password. First, you need to lock your computer screen:

  1. Open System Preferences, and then click Security.
  2. Select "Require password after sleep or screen saver begins."
Fig.01: Locking your computer screen

Fig.01: Locking your computer screen

Keyboard Shortcut To Lock Your Desktop Screen

To put screen to sleep press [CTRL] + [Shift] + [Eject].

Menubar Shortcut To Lock Your Desktop Screen

Open Applications > Utilities > Keychain Access > Preferences >Select "Status in Menu Bar".

Fig.02: Apple OS X Keychain utility

Fig.02: Apple OS X Keychain utility

To lock screen click on Menubar lock symbol > Select "Lock screen"

Fig.03: Locking the screen

Fig.03: Locking the screen

{ 17 comments… add one }

  • Marcus April 6, 2011, 12:12 pm

    You can use the default keyboard shortcut to to this as well.

    FN+SHIFT+CTRL+Eject button and it will lock the screen.

  • hormozan April 8, 2011, 4:00 am

    Mac OS is open source OS

    • TryME April 11, 2011, 6:17 pm


      • Marcus April 11, 2011, 7:21 pm

        Well, the core kernel (Darwin) is open source. But the OS X in it’s current form is def. not open source. And for every day that goes, it’s a bit less open.

        But I would still say, even if it pains me, that the core of OS X def. is open source.

  • Antony March 24, 2012, 8:17 pm

    I use a Mac Air and I do not have an eject key. Any other way, maybe from command line?

    • nixCraft March 24, 2012, 10:54 pm

      What about Menubar option?

      • Antony March 25, 2012, 12:50 am

        Didn’t want to use the mouse:)
        Would be more interesting if I know the actual command that gets executed when “LockScreen” is clicked,

        • Erik May 11, 2012, 3:57 pm

          From the command line, you can execute this to lock your screen:

          /System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend

          • allanon September 28, 2012, 11:44 pm

            On the Air, It’s CTRL+SHIFT+POWER button

            • Calip May 7, 2013, 3:19 am

              This worked on my Macbook Pro 13.3 with Retina display.
              Thanks a lot !

            • Marnix September 4, 2013, 11:07 am

              Perfect! Thx!

              On the Air it’s CTRL+(RIGTH)SHIFT+POWER to be exactly.

  • Sat June 20, 2012, 12:18 pm

    This is a great article, exactly what I was looking for.

    I am also looking for to make Macbook display as primary upon power failure. I use Dell monitor as primary and want to switch upon power failure to continue working with Macbook display.

    Any pointer would help.

    I appreciate for blogging.


  • Sat June 20, 2012, 12:31 pm

    Exactly what i was looking for.

    My previous post didn’t appear so posting again.

    I am also looking for a keyboard shortcut key to make Macbook display as primary upon power failure.

    I am using Dell monitor as primary.

    Your blog helped me to find what I was looking for.


  • Sat June 20, 2012, 12:36 pm


    I realised Fn key is unnecessary to lock screen.

    Ctrl + Shift + Eject key actually locks screen.

  • nixCraft June 20, 2012, 4:41 pm

    @Sat, we cache page for some time. So you will not see comments immediately.

  • Ph January 17, 2014, 12:55 pm

    Mac mini user here. How do I lock mac mini with keyboard? I have apple keyboard. Thanks!!!

  • Sonia February 21, 2014, 3:49 pm

    The best way to lock your mac screen quickly
    1.Search in the spotlight “Desktop & Screen saver”
    2.Go to bottom “HOT corners”
    3.Select screen saver and then move your cursor it will lock quickly (in that you have already activated the option “lock the screen immediately “)

Leave a Comment

   Tagged with: , , , , , , , , , ,