How to Stop Your MacBook from Turning On Automatically
Learn how to prevent your MacBook from turning on automatically when opening the lid or plugging it in.
By default, MacBooks automatically power on when you open the lid or connect the charger. While this feature is convenient, some users prefer manual control. Thankfully, Apple now allows us to disable it using simple Terminal commands.
π§ Disable Auto Power-On When Opening the Lid
To stop your MacBook from turning on when you open the lid, enter the following command in Terminal:
1
sudo nvram BootPreference=%01
π Explanation:
sudoβ Runs the command with administrator privileges.nvramβ Stands for Non-Volatile Random-Access Memory, which stores system settings.BootPreference=%01β Sets the boot preference to not start when opening the lid.
π Disable Auto Power-On When Plugging in the Charger
If you donβt want your MacBook to turn on when you connect it to power, use this command:
1
sudo nvram BootPreference=%02
π Explanation:
BootPreference=%02β Prevents the MacBook from automatically powering on when plugged in.
β¨οΈ Disable Auto Power-On When Pressing Keyboard Keys
To prevent your MacBook from turning on when you press any key on the keyboard, use this command:
1
sudo nvram AutoBoot=%00
π Explanation:
AutoBoot=%00β Disables the automatic power-on by keyboard feature. Your Mac will only turn on when you press the physical power button.- To restore the default keyboard behavior, run:
sudo nvram AutoBoot=%03
π Apply the Changes
After entering these commands, press Enter, and youβll be asked for your administrator password. Type it in and press Enter again.
β Done! Your MacBook will no longer turn on automatically based on the settings youβve modified.
If you ever want to reset to default settings, run:
1
sudo nvram -d BootPreference
For keyboard settings, use:
1
sudo nvram AutoBoot=%03
π Conclusion
By tweaking these settings, you gain more control over when your MacBook turns on. Whether you prefer to manually start your Mac or simply want to extend battery life, these tricks can be handy.
π Let me know if you found this helpful! π
β Support My Work
If you found this post helpful and want to support more content like this, you can buy me a coffee!
Your support helps me continue creating useful articles and tips for fellow developers. Thank you! π