How to connect with external monitor without using charger in macbook [2025]
The command sudo pmset disablesleep 1
is used on macOS to disable sleep mode on your Mac.
this command keeps your Mac awake indefinitely, even if you’re not using it.
sudo
: Runs the command with superuser (administrator) privileges because it makes a system-level change.pmset
: Stands for “Power Management Settings.” It’s a macOS utility to control power settings like sleep, display dimming, etc.disablesleep 1
: Tells the system to turn on (1
) the “disable sleep” mode. This prevents the Mac from going into sleep mode, regardless of inactivity.
To re-enable sleep mode, you can run:
sudo pmset disablesleep 0