LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-31-2011, 05:32 AM   #1
fredie_barron
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Rep: Reputation: 0
displaying all network interface card in linux.


hello all,
i am new to redhat linux,how do i list all newly added network interface card.can someone kindly help me with this?
 
Old 03-31-2011, 05:35 AM   #2
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Hello fredie barron, welcome to LQ,

Code:
lspci | grep -i ethernet
(executed as root) should do the job.

Markus
 
Old 03-31-2011, 05:40 AM   #3
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 239

Rep: Reputation: 14
i think -- ifconfig -a will do the job as well.
 
0 members found this post helpful.
Old 03-31-2011, 05:45 AM   #4
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Quote:
Originally Posted by NM04 View Post
i think -- ifconfig -a will do the job as well.
no, it will not since it shows only NICs which are up.

Markus
 
Old 03-31-2011, 06:05 AM   #5
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta2 on Lenovo Thinkpad W520
Posts: 6,771

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
Quote:
Originally Posted by markush View Post
no, it will not since it shows only NICs which are up.

Markus
No, it will show all NICS
 
Old 03-31-2011, 06:17 AM   #6
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Quote:
Originally Posted by Didier Spaier View Post
No, it will show all NICS
Code:
samsung:~# ifconfig 
wlan0     Link encap:Ethernet  HWaddr f0:7b:cb:2e:cd:3e  
          inet addr:192.168.178.26  Bcast:192.168.178.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:812 errors:0 dropped:0 overruns:0 frame:0
          TX packets:899 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:607146 (592.9 KiB)  TX bytes:135860 (132.6 KiB)

samsung:~#
this laptop has an ethernet-adapter as well
Code:
samsung:~# lspci | grep -i ethernet
04:00.0 Ethernet controller: Marvell Technology Group Ltd. 88E8040 PCI-E Fast Ethernet Controller
samsung:~#
But please note that I'm not really sure if this depends on the distribution.

Markus
 
Old 03-31-2011, 06:30 AM   #7
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-14.2beta2 on Lenovo Thinkpad W520
Posts: 6,771

Rep: Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112Reputation: 2112
The OP wanted to see the network interfaces, not the (PCI) network devices. Admittedly both commands are useful though, in order to match devices <-> interfaces

And 'ifconfig' shows all network interfaces - but only with the '-a' option.

Other than that, AFAIK both 'lspci' and 'ifconfig' commands are distribution-agnostics.
 
1 members found this post helpful.
Old 03-31-2011, 06:40 AM   #8
NM04
Member
 
Registered: Jan 2011
Distribution: Back Track,Fedora,centos
Posts: 239

Rep: Reputation: 14
markhush,
it seems you did only ifconfig and not ifconfig -a. try ifconfig -a-- this will show all the NIC's.
In fact both the commands will work for this thread.
 
1 members found this post helpful.
Old 03-31-2011, 07:16 AM   #9
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
Well ,

I've to say sorry, you're both right, I didn't think about the "-a" option. Thanks for correcting me.

Markus
 
Old 03-31-2011, 02:45 PM   #10
fredie_barron
LQ Newbie
 
Registered: Mar 2011
Posts: 5

Original Poster
Rep: Reputation: 0
thaks very much markush lspci | grep -i ethernet work find for me.
 
  


Reply


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
New network interface card not working ady608 Linux - Hardware 9 02-08-2009 05:57 PM
PCMCIA Network Interface Card!? FarbrorB Linux - Newbie 2 11-22-2007 07:32 PM
displaying network card throughput kapilcool Linux - Software 2 03-28-2007 09:41 PM
USB Network Interface Card: HELP! Saketh Linux - Wireless Networking 7 08-16-2005 10:19 PM


All times are GMT -5. The time now is 05:56 PM.

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