Is there a terminal command so I check what device is powering my MacBook?
2 Answers
Whilst @Frostisland command suggestion pmset -g ps
is a good starting point, it only provides basic information such as if your MacBook is currently using AC power or it's battery, the battery's current charge (%) and if it's charging it will tell you how long approximately until the battery will reach 100% charge.
If you wish to know more details you might like to read the man pages for pmset
command as there are other options that may give you more information of use to you. For example, you could run pmset -g pslog
and it will run a log process in terminal that updates continuously as the battery charges or discharges, until you terminate the process that is.
Alternatively, you could run the command system_profiler SPPowerDataType
which provides you the CLI version of the System Information application that will provide you a lot of useful power information such as your battery's health condition, current charge (%), the full capacity of the battery (measured in mAh), cycle count, etc. Additionally, if the MacBook is currently connected to an AC source, this command will also show you the charger's wattage, serial number and charging status (Yes/No), as well as a few other small things. That said all of this information can be obtained from pmset
, but this command gives you a concise list of the most important power information.
Note that system_profiler SPPowerDataType
is essentially displaying the same power information you can get via the GUI System Information application, which you can access by clicking in the menu bar:
>About This Mac
and then clicking on System Report
. Alternatively you can access the System Information application by holding down the option
key and clicking in the menu bar:
>System Information...
. Once you've opened the application, navigate to Hardware
>Power
in the side menu.
Of course this might not be the answer you're looking for, but just thought I should share it with you.
Open Terminal and type the following command: pmset -g ps
You'll get the information about the power source, indicating whether it is running on battery power or is plugged into an external power source.
-
This provides limited information but still valid. I would also suggest running
system_profiler SPPowerDataType
which provides more information, but it still might not be what you want. Note thesystem_profiler
command is just providing you CLI version of System Information application. You can access System Information by clicking in the menu bar:
>About This Mac
>System Report
and then it will open up System Information application, or alternatively, hold down option key and click in the menu bar:
>System Information
to open it up. Then just navigate toHardware
>Power
.– AVeljCommented Aug 7 at 8:48 -
3@AVelj So much extra info warrants its own answer. I'd encourage you to write it up. Commented Aug 7 at 9:08