Skip to content

Instantly share code, notes, and snippets.

@frizbee
Last active September 11, 2019 04:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save frizbee/3a0f4f42c76cef3111d6f22b72927cca to your computer and use it in GitHub Desktop.
Save frizbee/3a0f4f42c76cef3111d6f22b72927cca to your computer and use it in GitHub Desktop.
easy lock screen one line command for your mac

Add following line into your .zshrc or .bash_profile

alias lock='/System/Library/CoreServices/Menu\ Extras/user.menu/Contents/Resources/CGSession -suspend'

type lock in your terminal to lock screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment