10 Things You Can Do With Power Management Commands in Terminal
Reading Time: 4 minutesmacOS Ventura’s System Settings app may be a downgrade for power management, but that’s where these Terminal commands come in handy.
Power management commands are vital for fine-tuning your Mac’s power options. And they have become even more significant since macOS Ventura’s System Settings took out many energy-saving settings that Monterey and older versions had.
You can use these commands to do various things, from shutting down and restarting your Mac to checking hidden power management information—all in Terminal. So, if you’re looking to customize your power management, the information here should help you get started.
1. Put Your Mac to Sleep
One of the simple power management actions you can do in Terminal is putting your Mac to sleep. Type in the following command to put your Mac to sleep:
sudo pmset sleepnow
Please note that doing this (and any of the commands that start with ‘sudo’) needs you to have admin privileges. It will prompt you for a password, and your Mac will go to sleep as soon as you enter it.
2. Set Display Sleep Time
If you’d like to change how long it takes for your Mac’s display to go off, type ‘sudo pmset’ followed by ‘displaysleep’ and the time in minutes. For example, setting the display to sleep in 15 minutes will look like this:
sudo pmset displaysleep 15
You can also specify what power source you would like your command to act on:
-b: battery
-c: power adapter
-u: UPS
-a: all power sources
Therefore, if you would like your display to sleep after 15 minutes of inactivity while on battery power, your command will look like this:
sudo pmset -b displaysleep 15
Just replace the -b in the command with the proper value according to what power source you want it to act on.
3. Change How Long it Takes For Your Mac to Sleep
Putting your Mac to sleep differs from turning off the display. When your Mac is asleep, it won’t be able to run background processes like playing music or downloading media. However, for your Mac to go to sleep, the display needs to go off first. Here’s an example:
sudo pmset sleep 10
The above command will put your computer to sleep 10 minutes after your Mac’s display goes off. So, if you have a Mac with a display set to turn off after 30 minutes, it will take 40 minutes of inactivity before your Mac goes to sleep.
4. Enable or Disable Power Nap
If your Mac supports Power Nap, you can enable or disable it in Terminal. In short, Power Nap allows your Mac to occasionally wake up from sleep and ensure the software runs smoothly in the background. You can read more about what Power Nap on a Mac does in our dedicated article.
Here’s the command to turn on Power Nap:
sudo pmset powernap 1
If you want to turn it off, simply change the value from ‘1’ to ‘0’.
5. Enable or Disable Wake for Network Access
macOS comes with a feature that allows your Mac to access the internet while it’s asleep to keep your apps up to date. You can find this in System Settings > Battery > Options. However, if you would like to enable it in Terminal, enter the following command:
sudo pmset womp 1
Once again, change ‘1’ to ‘0’ if you want to turn it off.
6. Schedule Wake, Shutdown, and Restart
Once upon a time, you could do this in the macOS settings app. But now, you have to use Terminal to schedule a startup, shutdown, and restart on macOS Ventura. You can set two types of schedules: a one-time schedule and a repeat schedule.
If you would like to set your Mac to wake at a specific time in the future, for example, November 16th, 2025, at 9:30 am, then your command will look like this:
sudo pmset schedule wake '12/16/2025 09:30:00'
To shut down or restart, replace ‘wake’ in the command with ‘shutdown’ or ‘restart’ accordingly. When you change the date and time, conform to the MM/DD/YY and HH/MM/SS formats, or your command won’t work.
If you would like to set a schedule for repeating wakes, shutdowns, or restarts, then you have to familiarize yourself with the command values for the days of the week: Monday: M; Tuesday: T; Wednesday: W; Thursday: R; Friday: F; Saturday: S; Sunday: U.
Therefore, if you would like to set a repeat schedule for your Mac to turn on automatically by 05:30 am on weekdays, your command will look like this:
sudo pmset repeat wakeorpoweron MTWRF 05:30:00
You can replace ‘wakeorpoweron’ with ‘shutdown’ or ‘restart.’
7. Enable or Disable Auto-Restart After Power Loss
The autorestart Terminal command turns your Mac on after unexpected power loss, kernel panic, or system crash. This is especially useful for desktops or other stationary Macs used as servers because those must be back up and running as soon as possible.
Type this command to turn on automatic restart:
sudo pmset autorestart 1
Change ‘1’ to ‘0’ to turn it off.
8. Enable or Disable Proximity Wake
Newer Macs have a feature that automatically wakes it up once a paired iPhone or Apple Watch (with the same Apple ID) comes close enough to the Mac. This feature is called Proximity Wake, and you can activate it with the pmset utility in Terminal.
Enter the following command to activate it:
sudo pmset proximitywake 1
If you’d like to turn it off, simply change ‘1’ to ‘0’ in the command line.
9. Check Your Power Management Status
If you would like to see what your power management settings are, you should type in the following command:
pmset -g
This command will display a list of common power management settings values.
However, if you’re looking for a list of your scheduled power events, type in the following command:
pmset -g sched
10. Return Your Power Management Settings to Default
To return all your power management settings to default (much like clicking ‘Restore Defaults’ in the System Preferences app), enter the following command:
sudo pmset restoredefaults
Doing this won’t change your scheduled repeat events, though; you can cancel those with this command:
sudo pmset repeat cancel
If you would like to remove all scheduled events, then you will have to type in the following:
sudo pmset schedule cancellall
You Can Do Much More With Pmset
While this list covers some of the more useful commands you can do with the pmset utility, it is by no means an extensive collection of the possibilities. There’s still so much more you can do with power management in Terminal if you’re willing to do some research.
However, we hope you plan to use at least some of the Terminal commands here to fine-tune and improve your Mac experience.
Reference: https://www.makeuseof.com/power-management-terminal-commands-uses/
Ref: makeuseof
MediaDownloader.net -> Free Online Video Downloader, Download Any Video From YouTube, VK, Vimeo, Twitter, Twitch, Tumblr, Tiktok, Telegram, TED, Streamable, Soundcloud, Snapchat, Share, Rumble, Reddit, PuhuTV, Pinterest, Periscope, Ok.ru, MxTakatak, Mixcloud, Mashable, LinkedIn, Likee, Kwai, Izlesene, Instagram, Imgur, IMDB, Ifunny, Gaana, Flickr, Febspot, Facebook, ESPN, Douyin, Dailymotion, Buzzfeed, BluTV, Blogger, Bitchute, Bilibili, Bandcamp, Akıllı, 9GAG