背景:Linux下的硬件有很多,如何看网卡是啥样的,声卡是啥样的有几个USB口及品牌。[root@emulMachine?htdocs]#?lspci?|grep?USB
[root@ emulMachine?htdocs]?lspci?grep?USB?
00:03.0?USB?controller:?Broadcom?BCM5785?[HT1000]?USB?(rev?01)
00:03.1?USB?controller:?Broadcom?BCM5785?[HT1000]?USB?(rev?01)
00:03.2?USB?controller:?Broadcom?BCM5785?[HT1000]?USB?(rev?01)
该命令作用:将lspci的输出当做输入,从中找出包含Eth的行。在我的Fedora机器上运行结果为
This command functions xff1a; uses the output of lspci as input xff0c; finds the line containing Eth. Runs on my Fedora machine as
[root@localhost etc]# lspci | grep Eth
00:04.0 Ethernet controller: Silicon Integrated Systems [SiS] SiS900 PCI Fast Ethernet (rev 91)
lspci命令解说:该命令能列出机器中的PCI设备信息,如声卡,显卡,Modem,网卡等信息,主板集成设备的信息也能列出来,lspci读取的是hwdata数据库。
The lspci command explains & #xff1a; the command lists PCI device information in the machine & #xff0c; e.g. soundcards & #xff0c; video cards & #xff0c; Modem, information such as webcards & #xff0c; information on the main plate integration device can also be listed for xff0c; lspci has read the hwdata database.
| 管道命令,之前的输出作为之后的输入
Pipe command xff0c; previous output as input after
grep?grep命令后设置指定过滤的字符串,任何没有包括指定字符串的行都不会显示。
Sets the specified filter string & #xff0c after the grep?grep command; any line that does not include the specified string will not be displayed.
注册有任何问题请添加 微信:MVIP619 拉你进入群
打开微信扫一扫
添加客服
进入交流群
发表评论