如何使用终端列出已安装的网卡?


Answers:


34

尽管上述方法有效,但还有其他选项可以减少键入。

ip link show

或我最喜欢的netstat

netstat -i

您还可以使用ifconfig和iwconfig获取其他信息或有关特定设备的信息

ifconfig eth0

iwconfig wlp1s0

取决于您希望显示的信息种类。


键入仅ip link产生与相同的结果show
Serge Stroobandt

14

您可以使用:

lspci

lspci :将列出所有PCI设备

现在尝试以下命令:

lspci | egrep -i --color 'network|ethernet' 

该命令将列出可用和已安装的网卡,Ethernet如果找到则突出显示。

示例输出


3

如果卡是物理安装的,但未配置,则可以看到以下内容:

cat /proc/net/dev

1

以下命令提供有关硬件的详细信息:

sudo lshw -class network

此命令将向您显示当前的NetworkManager配置:

nmcli
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.