Created
September 11, 2021 20:36
-
-
Save agmm/6906b0d6264ba32362774c0a7cb9ba2a to your computer and use it in GitHub Desktop.
Lock MacOS screen
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://apple.stackexchange.com/questions/80058/lock-screen-command-one-liner | |
# By itself, this command only causes the display to sleep, resulting in a black screen. | |
# By configuring your computer to require a password immediately after sleep, | |
# this one-liner works as a "lock computer" command. | |
pmset displaysleepnow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment