In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-28 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article is about how linux can see which network cards are available. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.
Linux to see which network cards are available: 1, use the "ifconfig-a" command to view; 2, use the "cat / proc/net/dev" command to view; 3, use the "lspci | grep-I 'eth'" or "lspci | grep-I net" command to view.
The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Check how many network cards there are in the Linux system
Method 1: use ifconfig-a
Ifconfig: the most commonly used command to configure and view network interface information. Executing this command on the server will get the following content of the class, where you can see the status and information of multiple devices and devices.
[root@xuegod65 ~] # ifconfig-aeth0 Link encap:Ethernet HWaddr 00:0C:29:04:08:91 inet addr:192.168.1.250 Bcast:192.168.1.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe04:891/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:14454 errors:0 dropped:0 overruns:0 frame:0 TX packets:961 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1174828 (1.1 MiB) TX bytes:112979 (110.3 KiB) eth2 Link encap:Ethernet HWaddr 00:0C:29:04:08:9B inet addr:192.168.240.1 Bcast:192.168.240.255 Mask:255.255.255.0 inet6 addr: fe80::20c:29ff:fe04 89b/64 Scope:Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:112 errors:0 dropped:0 overruns:0 frame:0 TX packets:90 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:9334 (9.1 KiB) TX bytes:8366 (8.1 KiB) lo Link encap:Local Loopback inet addr:127.0.0. 1 Mask:255.0.0.0 inet6 addr:: 1Comp128 Scope:Host UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0b) TX bytes:0 (0.0b)
Method 2: use cat / proc/net/dev
[root@xuegod65 ~] # cat / proc/net/devInter- | Receive | Transmit face | bytes packets errs drop fifo frame compressed multicast | bytes packets errs drop fifo colls carrier compressed lo: 0 000 000 0 000 0 000 0 0 0 eth0: 1190124 14635 0 0 0 119423 999 0 0 0 eth2: 9334 112 0 0 0 8366 90 0 0 0
Method 3: use lspci | grep-I 'eth' or lspci | grep-I net
The devices on each pci bus can be listed, and the list of network card devices can be obtained after filtering through grep.
[oracle@mori ~] $lspci | grep-I 'eth' 02grep 01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) 02eth' 06.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) [oracle@mori ~] $lspci | grep-I net 02grep 01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) 02grep 06.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01) Thank you for reading! This is the end of the article on "how to check the network cards in linux". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.