Sleep command doesn't work in terminal

G

greenapple

Guest
In terminal, when I enter sleep 20, it waits 20 seconds and then returns to the command prompt without going to sleep. What am I doing wrong? I tried sudo sleep 20, too.
 

rman


Retired Staff
Joined
Dec 24, 2002
Messages
12,637
Reaction score
168
Points
63
Location
Los Angeles, California
Your Mac's Specs
14in MacBook Pro M1 Max 32GB 2TB
The sleep command in unix is not the same as putting your system to sleep. The unix sleep command only pauses a process for a short period of time, as you just found out.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top