Retrieve both eth* and “long” names (manufacturer) for every network interface?












0















I'm on Ubuntu 18.04. Following the examples on https://www.cyberciti.biz/faq/linux-list-network-cards-command/, I can use



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


to get manufacturer names of devices:



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


Then, I can use:



# ifconfig -a


or



# ip link show


... to show something like:



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


But is there a command, that will allow me to list both "short" device names eth0 and "long" ones (that is, Manufacturer, model) for all network interfaces?










share|improve this question



























    0















    I'm on Ubuntu 18.04. Following the examples on https://www.cyberciti.biz/faq/linux-list-network-cards-command/, I can use



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


    to get manufacturer names of devices:



    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


    Then, I can use:



    # ifconfig -a


    or



    # ip link show


    ... to show something like:



    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


    But is there a command, that will allow me to list both "short" device names eth0 and "long" ones (that is, Manufacturer, model) for all network interfaces?










    share|improve this question

























      0












      0








      0








      I'm on Ubuntu 18.04. Following the examples on https://www.cyberciti.biz/faq/linux-list-network-cards-command/, I can use



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


      to get manufacturer names of devices:



      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


      Then, I can use:



      # ifconfig -a


      or



      # ip link show


      ... to show something like:



      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


      But is there a command, that will allow me to list both "short" device names eth0 and "long" ones (that is, Manufacturer, model) for all network interfaces?










      share|improve this question














      I'm on Ubuntu 18.04. Following the examples on https://www.cyberciti.biz/faq/linux-list-network-cards-command/, I can use



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


      to get manufacturer names of devices:



      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


      Then, I can use:



      # ifconfig -a


      or



      # ip link show


      ... to show something like:



      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


      But is there a command, that will allow me to list both "short" device names eth0 and "long" ones (that is, Manufacturer, model) for all network interfaces?







      shell-script network-interface






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Feb 23 at 21:19









      sdaausdaau

      2,74463152




      2,74463152






















          1 Answer
          1






          active

          oldest

          votes


















          0














          Found this as I was writing the question:



          $ 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


          Seems to work fine, but would love to hear if there is another way to achieve this.






          share|improve this answer



















          • 1





            What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

            – ilkkachu
            Feb 24 at 1:37











          • thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

            – sdaau
            Feb 24 at 1:47













          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502580%2fretrieve-both-eth-and-long-names-manufacturer-for-every-network-interface%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          0














          Found this as I was writing the question:



          $ 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


          Seems to work fine, but would love to hear if there is another way to achieve this.






          share|improve this answer



















          • 1





            What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

            – ilkkachu
            Feb 24 at 1:37











          • thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

            – sdaau
            Feb 24 at 1:47


















          0














          Found this as I was writing the question:



          $ 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


          Seems to work fine, but would love to hear if there is another way to achieve this.






          share|improve this answer



















          • 1





            What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

            – ilkkachu
            Feb 24 at 1:37











          • thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

            – sdaau
            Feb 24 at 1:47
















          0












          0








          0







          Found this as I was writing the question:



          $ 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


          Seems to work fine, but would love to hear if there is another way to achieve this.






          share|improve this answer













          Found this as I was writing the question:



          $ 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


          Seems to work fine, but would love to hear if there is another way to achieve this.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Feb 23 at 21:19









          sdaausdaau

          2,74463152




          2,74463152








          • 1





            What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

            – ilkkachu
            Feb 24 at 1:37











          • thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

            – sdaau
            Feb 24 at 1:47
















          • 1





            What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

            – ilkkachu
            Feb 24 at 1:37











          • thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

            – sdaau
            Feb 24 at 1:47










          1




          1





          What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

          – ilkkachu
          Feb 24 at 1:37





          What would you want to do differently? If lshw gives the information you want, then why not use it? Or would you just want the information presented in some other way?

          – ilkkachu
          Feb 24 at 1:37













          thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

          – sdaau
          Feb 24 at 1:47







          thanks @ilkkachu - mostly would like to know if there is any other application that can extract both pieces of information (as I'm kind of surprised that, say, ifconfig has no option to print manufacturer etc); otherwise I'm happy with lshw output

          – sdaau
          Feb 24 at 1:47




















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f502580%2fretrieve-both-eth-and-long-names-manufacturer-for-every-network-interface%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          How to reconfigure Docker Trusted Registry 2.x.x to use CEPH FS mount instead of NFS and other traditional...

          is 'sed' thread safe

          How to make a Squid Proxy server?