Using Terminal app to put Mac to sleep

If there is no other way to put my Mac to sleep every night like I used to before Ventura, I need to know what to put into Terminal. I've tried sudo pmset repeat sleep MTWTFSU 23:00:00 but it doesn't work. Thanks.

MacBook Pro 14″, macOS 14.8

Posted on Jan 24, 2026 1:55 PM

Reply
Question marked as Top-ranking reply

Posted on Jan 24, 2026 9:27 PM

Ok, thanks for confirming.


Unfortunately I cannot find the official Apple article with instructions (searched DDG & Apple site search).


The AI search result revealed what I was questioning, which was your selection for Thursday. According to the AI result, Thursday is represented by the letter "R" and confirmed by the "pmset" man pages (use arrow keys to scroll and press "Q" to exit):

man  pmset


This means your command should be:

sudo  pmset  repeat  sleep  MTWRFSU  23:00:00
6 replies
Question marked as Top-ranking reply

Jan 24, 2026 9:27 PM in response to plantsower

Ok, thanks for confirming.


Unfortunately I cannot find the official Apple article with instructions (searched DDG & Apple site search).


The AI search result revealed what I was questioning, which was your selection for Thursday. According to the AI result, Thursday is represented by the letter "R" and confirmed by the "pmset" man pages (use arrow keys to scroll and press "Q" to exit):

man  pmset


This means your command should be:

sudo  pmset  repeat  sleep  MTWRFSU  23:00:00

Jan 24, 2026 8:14 PM in response to plantsower

plantsower wrote:

If there is no other way to put my Mac to sleep every night like I used to before Ventura, I need to know what to put into Terminal. I've tried sudo pmset repeat sleep MTWTFSU 23:00:00 but it doesn't work. Thanks.

If the Mac is not sleeping, then this probably won't make any difference if selecting "Sleep" from the Apple menu doesn't work. Closing the Display Clamshell lid is more complicated & may not always work...plus that requires a fully functional Lid Angle Sensor on the M-series Macs & some later Intel Macs.


I know that some software configurations will keep waking the Mac from sleep multiple times.....sometimes every minute or so, but 20-30 minutes is not unusual. Some third party software can even prevent macOS from initiating sleep.


You can verify whether the computer is entering sleep mode & waking up by using the information in my other post which provides some Terminal commands including the reason for the sleep/wake/start events although they can be very cryptic:

@HWTech Post to Check Sleep/Wake/Start times - Apple Community


That post also includes a suggestion to use EtreCheck & posting the complete report here so we can examine it for possible clues.


In addition, pressing any key or even lightly brushing the Trackpad can wake/power on the Mac. Connecting & disconnecting external devices can also wake/power on the Mac.


Jan 24, 2026 8:44 PM in response to plantsower

I'm sorry I wasn't more specific. My Mac does go to sleep and/or I can put it to sleep. What I was talking about was having my Mac go to sleep at the same time every night so when I am in bed the recordings I am listening to will stop after a couple of hours. I used to be able to do this from the Clock App but for some strange reason Apple decided to stop that ability in Ventura. They took away that ability in Battery, too. It was so helpful. Now I have to use Terminal. I'm not sure why my terminal command didn't work when I typed this but it does now.


Thank you for responding.

Using Terminal app to put Mac to sleep

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.