Normally, we can easily check the state of a network interface card like whether the cable plugged in to the slot or the network card is up or down in Graphical mode. What if you have only command line mode? Ofcourse, you can turn around the system and check for the cable is properly plugged in, or you can do the same easily from your Terminal. Here is how to do that. This method is almost same for Debian and RPM based systems.
Check Network Card State
I have two ethernet cards on my laptop. One, eth0, is wired, And another, wlan0, is wireless.
Let us check the state of the eth0.
Or, use the following command to check the status.
As you see in the above results, the NIC is down or cable is not connected.
Let me plug a network cable to the eth0 slot, and check again.
After plugged in the cable, I executed the above commands:
Voila, the eth0 is up or the cable is connected to eth0.
Be mindful, it doesn’t mean that the IP address has been assigned to the eth0. The cable is just connected to that slot. That’s all.
Let us check for the wlan0 state.
The result is 1, which means the wlan0 is up and connected.
Likewise, you can check all the network cards on your machine.