linux下怎么查看网卡信息

caocao3年前教程449

在线wifi跑包 金刚包跑包 cap跑包 hccapx ewsa在线 就来 曹操wifi

各位好 又见面了 我是曹操 今天给大家带来一篇新的教程

希望各位细心学习 低调用网

cdlinux怎么识别内置网卡

Linux查看网卡的方法:

  1. 使用ifconfig命令。
  2. 使用lspci |grep -i 'eth'lspci | grep -i net命令。
  3. 使用iwconfig命令。
  4. 使用ethtool工具,查询配置网卡参数。
[oracle@mori ~]$ ifconfig
      eth0      Link encap:Ethernet  HWaddr 00:0C:29:A4:5A:BF  
          inet addr:192.168.1.160  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea4:5abf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1650 errors:0 dropped:0 overruns:0 frame:0
          TX packets:112 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:134000 (130.8 KiB)  TX bytes:12228 (11.9 KiB)
     eth1      Link encap:Ethernet  HWaddr 00:0C:29:A4:5A:C9  
          inet addr:192.168.1.161  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::20c:29ff:fea4:5ac9/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1618 errors:0 dropped:0 overruns:0 frame:0
          TX packets:88 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:125909 (122.9 KiB)  TX bytes:9320 (9.1 KiB)
     lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:182 errors:0 dropped:0 overruns:0 frame:0
          TX packets:182 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:10340 (10.0 KiB)  TX bytes:10340 (10.0 KiB)

本教程操作环境:Red Hat Enterprise Linux 6.1系统、Dell G3电脑。

一、首先是最简单明了的两个命令,ifconfiglspci

  1. ifconfig:最常用的配置和查看网络接口信息的命令,执行此命令可得到以下内容,可看到多个设备和设备状态、信息。
  [oracle@mori ~]$ lspci |grep -i 'eth'
  02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
  02:06.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
  [oracle@mori ~]$ lspci | grep -i net
  02:01.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
  02:06.0 Ethernet controller: Intel Corporation 82545EM Gigabit Ethernet Controller (Copper) (rev 01)
  1. lspci |grep -i 'eth'lspci | grep -i net命令:可列出每个PCI总线上的设备,通过grep过滤后可得到网卡设备列表,下文可看到PCI总线上的网络设备有两个,是两个Intel的网卡。
  [oracle@mori ~]$ iwconfig
  lo        no wireless extensions.
  eth0      no wireless extensions.
  pan0      no wireless extensions.
  eth1      no wireless extensions.
  [root@mori oracle]# ethtool -p eth0
  1. iwconfig:用于查看无线网络,如果设备上有无线网卡,可使用此命令来查看。在我的设备上并没有无线网卡设备,因此会得到如下信息。

二、除以上几个命令外,还有一个神秘而强大的工具叫ethtool

  1. ethtool命令主要用于查询配置网卡参数。
  2. 用法:ethtool ethN,其中N是对应网卡的编号,如eth0、eth1等等。
  3. ethtool的功能较多,这里不一一赘述。如有需求和查看其说明页,请使用man ethtool命令。这里单独讲解一个功能,适用于如下场景:你的服务器有多个网卡并且已经配置好运行当中,但你却不记得eth0、eth1、eth2等分别对应的是哪个物理网卡,此时可以使用如下命令:

相关文章

kali 中 MongoDB安装

kali 中 MongoDB安装

在线wifi跑包 金刚包跑包 cap跑包 hccapx ewsa在线 就来 曹操wifi 各位好 又见面了 我是曹操 今天给大家带来一篇新的教程 希望各位细心学习 低调用网 # 0. 以下适用于 任...

怎样破解无线网络密码(一文读懂WIFI破解原理及攻防)

在线wifi跑包 金刚包跑包 cap跑包 hccapx ewsa在线 就来 曹操wifi 各位好 又见面了 我是曹操 今天给大家带来一篇新的教程 希望各位细心学习 低调用网 本文由信息安全我来讲你来...

有关Kali更新问题的解决方法。

有关Kali更新问题的解决方法。

在线wifi跑包 金刚包跑包 cap跑包 hccapx ewsa在线 就来 曹操wifi 各位好 又见面了 我是曹操 今天给大家带来一篇新的教程 希望各位细心学习 低调用网 最近更新源遇到了一些问题...

fbinsttool.exe使用说明—如何用FbinstTool制作启动优盘?

fbinsttool.exe使用说明—如何用FbinstTool制作启动优盘?

在线wifi跑包 金刚包跑包 cap跑包 hccapx ewsa在线 就来 曹操wifi 各位好 又见面了 我是曹操 今天给大家带来一篇新的教程 希望各位细心学习 低调用网 fbinsttool.e...