I used the code posted above by jnk. Then I used appify to turn it into an OS X app, [mathiasbynens.be/notes/shell-script-mac-apps][1]. Then I used Quicksilver to assign my own keyboard shortcut (I chose cmd+L). Terminal is not opening/staying open (as some were concerned) with how I have it set up because I am launching an OS X app instead. 1. Follow the answer above by jnk, [https://apple.stackexchange.com/questions/80058/lock-screen-command-one-liner#answer-123738][2] 2. Use appify to turn it into an OS X app by following the link above in my summary. 3. Install Quicksilver. 4. Use Quicksilver to assign a keyboard shortcut to launch the new application. It is under 'Triggers.' I enjoy Quicksilver because I love having keyboard shortcuts/hotkeys to launch applications and websites on OS X. [1]: http://mathiasbynens.be/notes/shell-script-mac-apps [2]: https://apple.stackexchange.com/questions/80058/lock-screen-command-one-liner#answer-123738