How Do I Detect If I am Connected to a Wired, Ethernet Network?

Hey JM,

Run this from an Execute a Shell Script action:

ifconfig -a

Then search for a line that looks like this:

media: autoselect (100baseTX ) status: active

If you find it then your Ethernet is active.

You can use something like this to toggle Wi-Fi on/off.

-Chris

1 Like