2016-10-02 04:55:36 +01:00
|
|
|
# pmset
|
|
|
|
|
|
|
|
> Configure macOS power management settings, as one might do in System Preferences > Energy Saver.
|
2016-10-02 18:50:56 +01:00
|
|
|
> Commands that modify settings must begin with `sudo`.
|
2024-01-31 10:20:27 +00:00
|
|
|
> More information: <https://keith.github.io/xcode-man-pages/pmset.1.html>.
|
2016-10-02 04:55:36 +01:00
|
|
|
|
|
|
|
- Display the current power management settings:
|
|
|
|
|
|
|
|
`pmset -g`
|
|
|
|
|
|
|
|
- Display the current power source and battery levels:
|
|
|
|
|
|
|
|
`pmset -g batt`
|
|
|
|
|
2020-10-04 21:10:27 +01:00
|
|
|
- Put display to sleep immediately:
|
|
|
|
|
|
|
|
`pmset displaysleepnow`
|
|
|
|
|
2016-10-02 04:55:36 +01:00
|
|
|
- Set display to never sleep when on charger power:
|
|
|
|
|
2016-10-02 15:58:21 +01:00
|
|
|
`sudo pmset -c displaysleep 0`
|
2016-10-02 04:55:36 +01:00
|
|
|
|
|
|
|
- Set display to sleep after 15 minutes when on battery power:
|
|
|
|
|
2016-10-02 15:58:21 +01:00
|
|
|
`sudo pmset -b displaysleep 15`
|
2016-10-02 04:55:36 +01:00
|
|
|
|
|
|
|
- Schedule computer to automatically wake up every weekday at 9 AM:
|
|
|
|
|
2016-10-02 15:58:21 +01:00
|
|
|
`sudo pmset repeat wake MTWRF 09:00:00`
|
2016-10-02 04:55:36 +01:00
|
|
|
|
|
|
|
- Restore to system defaults:
|
|
|
|
|
2016-10-02 15:58:21 +01:00
|
|
|
`sudo pmset -a displaysleep 10 disksleep 10 sleep 30 womp 1`
|