This command tells us whether a cable is plugged into our network interface or not. By default, it is not installed in Ubuntu, to install it use command sudo apt-get install ifplugd.
Look at the above snapshot, it shows the status of all interfaces. Here, link beat detected means it is plugged in. In our system, lo and wlan0 are plugged in while eth0 is unplugged.