#Power & Sleep

35 solutions

Keep Your Mac Awake with caffeinate
macOSsleepTerminalPower & Sleep

caffeinate holds sleep off while a command runs, or for a fixed number of seconds.

Low risk ✓ 2026-09-18
Check Battery Health and Cycle Count from the Terminal
macOSPower & SleepDiagnosticsbattery

pmset -g batt shows charge state; system_profiler SPPowerDataType adds condition and cycle count.

Low risk ✓ 2026-09-18
Suspend or Hibernate from the Terminal (systemctl)
LinuxsleeplaptopPower & Sleep

Use systemctl suspend for sleep-to-RAM and systemctl hibernate for sleep-to-disk, plus hybrid-sleep and suspend-then-hibernate variants.

Medium risk ✓ 2026-09-18
Enable Hibernate with powercfg /hibernate on
WindowscmdPower & Sleephibernate

Restore the missing Hibernate option and the hiberfil.sys file it depends on, from an admin prompt.

Low risk ✓ 2026-09-18
Shut down Windows on a timer
WindowscmdPower & Sleeptroubleshooting

Use shutdown /s /t to make Windows power off automatically after a chosen number of seconds, and shutdown /a to cancel it.

Medium risk ✓ 2026-09-19
Stop Windows Turning Off Your Network Adapter (Power Saving)
WindowsadapterPower & Sleeppowershell

Disable adapter power management so Wi-Fi doesn't disconnect every time the PC sleeps.

Low risk ✓ 2026-09-18
Improve laptop battery life with TLP
LinuxtlplaptopPower & Sleep

Install and enable TLP so Linux automatically applies power-saving settings for battery operation; check results with tlp-stat.

Medium risk ✓ 2026-09-18
Check Laptop Battery Charge and Status from the Command Line
WindowswmiPower & Sleepbattery

Read the current battery percentage, charging status and estimated remaining runtime in PowerShell with Win32_Battery.

Low risk ✓ 2026-09-19
Turn Fast Startup On or Off via the Registry
WindowsregistrybootPower & Sleep

Disable or re-enable Windows Fast Startup (hybrid boot) with the HiberbootEnabled registry value to fix shutdown and dual-boot problems.

Medium risk ✓ 2026-09-18
Restart or Shut Down Your Mac from the Terminal with shutdown
macOSTerminalPower & Sleep

Reboot or power off macOS with the built-in shutdown command — handy when the menu bar or remote session misbehaves.

Medium risk ✓ 2026-09-19
Read Your Mac's Sleep Settings with pmset -g custom
macOSsleeppmsetPower & Sleep

pmset -g custom prints the live sleep configuration separately for battery and charger.

Low risk ✓ 2026-09-18
Sleep the Display or the Mac with pmset
macOSsleeppmsetPower & Sleep

pmset includes two one-shot commands: displaysleepnow blanks the screen, sleepnow puts the whole Mac to sleep.

Low risk ✓ 2026-09-18