Sometimes we need to quickly leave our Mac (desktop or laptop) computer, but don’t want other people nearby to get access to your account or data. This is a very common situation at work, or with shared computer at home. There’s a quick way to force our Mac to go back to its lock screen, so the next person who wants to use the computer should type a password. Obviously this will NOT prevent theft or any physical damage to your Mac, but this simple tips might be useful for everyday situation when you just don’t want other people to pry into your logged in browser or opening your documents.
First, of course you need to set up your Mac to require password immediately. This can be done by going to System Preferences > Security & Privacy > General. There you should see a checkbox saying Require password followed by a dropdown. Tick the checkbox and choose immediately in the dropdown.
Next, there are two possible ways to bring Mac into lock screen:
Without forcing Mac into sleep mode: Press Control + Shift + Eject in your keyboard; or in newer Macbooks without Eject key, press Control + Shift + Power.
By putting our Mac into sleep mode: Press Command + Option + Eject, or Command + Option + Power for newer Macbooks.
That’s it, I hope this helps.