_xp1qw
Last Updated: February 25, 2016
·
1.733K
· eddywashere

Put your mac to sleep from the terminal

osx
osascript -e 'tell application "System Events" to sleep'

*edit, thanks @colinm for the not so verbose version!

pmset sleepnow

I started to use this after pushing the last commit of the day. Ex:

git push && pmset sleepnow

2 Responses
Add your response

7834

For something more easily memorable, try:
pmset sleepnow

over 1 year ago ·
7842

I use good ol' Alfred;

Option + Space "sleep" enter

over 1 year ago ·