Is there any Linux terminal command to query if the CMOS battery is working?

There is no direct Linux terminal command that explicitly outputs the CMOS battery status as a voltage level or detailed measurement. However, Linux provides a basic go/no-go indicator of the CMOS battery status through the realtime clock (RTC) interface.

You can check the CMOS battery status by running:

cat /proc/driver/rtc | grep batt_status

For a more detailed voltage measurement, specialized hardware monitoring tools like lm-sensors might detect the battery voltage if the sensor is supported and labeled (e.g., Vbat), but this is uncommon and motherboard-specific.

In summary, the simplest method to check CMOS battery health under Linux is:

cat /proc/driver/rtc | grep batt_status

— showing “okay” means the battery is working; otherwise, it may need replacement.[1][5][8]

1 2 3 4 5 6 7 8 9 10