FG
💻 Software

How to check if power cable is connected from the command line?

Fresh7 days ago
Mar 15, 202613429 views
Confidence Score0%
0%

Problem

I'm running ubuntu on my notebook and I need a way to check (from the command line) if the power cable is connected. Is there any system file that keeps log of this? or is there a bash command that will help me? I need this for a script that will behave differently depending on whether the power co…

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Unverified Fix
New Fix – Awaiting Verification

Fix for: How to check if power cable is connected from the command line?

Low Risk

The value to put in place of may vary.

Awaiting Verification

Be the first to verify this fix

Sign in to verify this fix

Environment