Last active
July 27, 2019 16:24
-
-
Save TheTechRobo/17c721e5ce3894147ef384e6090917d0 to your computer and use it in GitHub Desktop.
lock your Mac from the CLI
This file contains 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
import os | |
print("John Lockeing the computer............") | |
os.system('/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend') | |
print("Locked") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment