formats

Detect Network Cable Link in Linux

Published on May 4, 2011, by + in linux, sysadmin.




To check for the presence of a network link, use the command ethtool.

For example, this checks eth0:

# ethtool eth0

or

$ sudo ethtool eth0



Look for a line which says ‘Link detected: yes / no’. The exact output may vary depending on your Linux distribution.



Debian / Ubuntu looks like this:

01ethtool_ubuntu

Red Hat / CentOS looks like this:

02ethtool_redhat



Cool!



Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.

Home linux Detect Network Cable Link in Linux