各ネットワークインターフェースのeth *と「長い」名前(製造元)を検索しますか?

各ネットワークインターフェースのeth *と「長い」名前(製造元)を検索しますか?

Ubuntu 18.04を使用しています。以下の例に従ってください。https://www.cyberciti.biz/faq/linux-list-network-cards-command/、使えます

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

デバイスの製造元名を取得します。

09:00.0 Ethernet controller: Broadcom Corporation NetXtreme BCM5761e Gigabit Ethernet PCIe (rev 10)
0c:00.0 Network controller: Intel Corporation Ultimate N WiFi Link 5300

その後、次のものを使用できます。

# ifconfig -a

または

# ip link show

...次を表示します。

1: lo:  mtu 16436 qdisc noqueue state UNKNOWN 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: eth0:  mtu 1500 qdisc mq state UP qlen 1000
    link/ether b8:ac:6f:65:31:e5 brd ff:ff:ff:ff:ff:ff
    inet 192.168.1.5/24 brd 192.168.1.255 scope global eth0
    inet6 fe80::baac:6fff:fe65:31e5/64 scope link 
       valid_lft forever preferred_lft forever

eth0しかし、すべてのネットワークインターフェイスの「短い」デバイス名と「長い」デバイス名(製造元、モデルなど)を一覧表示するコマンドはありますか?

ベストアンサー1

質問を書いてこのような事実を見つけました。

$ sudo lshw -class network | grep 'logical\|description\|product\|vendor\|\*-'
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       logical name: enp1s0
  *-network
       description: Wireless interface
       product: Wireless 7265
       vendor: Intel Corporation
       logical name: wlp2s0

正常に動作しているようですが、これを達成するための別の方法があるかどうかを聞きたいです。

おすすめ記事