Fun tip. It is not obvious how to lock an OSX computer without logging off. After some searching a ran across a
Gist which suspends the current session. This is equivalent to locking (Win+L) a Windows computer.
lock:1 2 | #!/bin/bash
/System/Library/CoreServices/Menu \ Extras /User .menu /Contents/Resources/CGSession -suspend
|
If you save that into a file, you can make it executable by running:
This works great since I always have a terminal window open. Presuming the file is accessible via the path. I can just run the following and it locks the Mac.
No comments:
Post a Comment