Skip to content

Instantly share code, notes, and snippets.

@HomerJSimpson
Created July 25, 2013 03:27
Show Gist options
  • Save HomerJSimpson/6076707 to your computer and use it in GitHub Desktop.
Save HomerJSimpson/6076707 to your computer and use it in GitHub Desktop.
Lock Mac OS X screen from command line
#!/bin/bash
/System/Library/CoreServices/Menu\ Extras/User.menu/Contents/Resources/CGSession -suspend
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment