
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:
Red Hat / CentOS looks like this:
Cool!