Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-16-2015, 06:12 AM   #1
Registered: Oct 2005
Location: Bangladesh
Posts: 504

Rep: Reputation: 31
Detect NIC interface in Linux

Dear Friends ,

One of My linux server , I have 4 NIC card . I plugged a network cable one of NIC card . Now How can I understand which interface (eth0 or eth1 or eth2 or eth3) is connected with the cable ?

Which command I need to use to find it ?

My second question is :
using 'ethtool ' output I got a line : "Link detected : yes"
what does it means ?
Old 03-16-2015, 06:29 AM   #2
Registered: Oct 2011
Posts: 59

Rep: Reputation: Disabled
ethtool ethx gives response connected if a lan cable is plugged in and connected to network device.
try each eth0, eth1 and ethx to know which is really connected but if you type ifconfig you should get the nic and its ip address.
Old 03-16-2015, 09:35 AM   #3
Registered: Mar 2013
Distribution: Redhat, Ubuntu
Posts: 540

Rep: Reputation: 153Reputation: 153
Install bmon. The interface where RX/TX is changing is the one you plugged into.


You may just try

# cat /sys/class/net/eth0/operstate
Source: How to detect whether a physical cable is connected to network card slot on Linux

Last edited by mddnix; 03-16-2015 at 09:48 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Headless install -- How to auto detect NIC driver and interface? guanx Slackware - Installation 9 07-03-2012 10:23 AM
linux can not detect linksys NIC EG1032 v2 linuxtraveler Linux - Networking 4 02-08-2006 03:50 PM
Help, linux install didnt detect my onboard nic!! abefroman Linux - Hardware 4 11-18-2005 07:07 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:13 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration