Last Updated: February 25, 2016
·
1.93K
· eddywashere

Put your mac to sleep from the terminal

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

For something more easily memorable, try:
pmset sleepnow

over 1 year ago ·

I use good ol' Alfred;

Option + Space "sleep" enter

over 1 year ago ·