歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> 如何在Ubuntu上找出可用的網絡適配器

如何在Ubuntu上找出可用的網絡適配器

日期:2017/2/28 14:23:26   编辑:Linux教程

想知道在Linux中你正在使用的網卡是什麼嗎? 在Linux中很容易就找出網卡的生產商。打開一個終端並輸入下面的額命令:

  1. sudo lshw -C network

如果上面的命令不能在sudo下使用,那就別用 sudo 的特權模式。它的輸出看上去有點奇怪但是很有用。

  1. *-network
  2. description:Wirelessinterface
  3. product: BCM4360 802.11acWirelessNetworkAdapter
  4. vendor:BroadcomCorporation
  5. physical id:0
  6. bus info: pci@0000:03:00.0
  7. logical name: wlan0
  8. version:03
  9. serial:9c:f3:87:c1:5d:6a
  10. width:64 bits
  11. clock:33MHz
  12. capabilities: busmaster caplist ethernet physical wireless
  13. configuration: broadcast=yes driver=wl0 driverversion=6.30.223.248(r487574) ip=192.168.1.23 latency=0 multicast=yes wireless=IEEE 802.11abg
  14. resources: irq:18 memory:b0600000-b0607fff memory:b0400000-b05fffff

如你所見,我Macbook Air上的無線網卡是BCM4360,這是一款在Ubuntu下面很容易出現無法檢測無線網絡問題的網卡。

lshw 命令實際上死用來列出硬件的,因此命令的名字是lshw。帶上網絡的選項後,就會只過濾出網絡硬件了。

了解網卡的其他方法

另外你還可以使用lspci命令來顯示PCI總線上的信息。你不應該用特權模式來運行這個命令。只需要在命令行下輸入:

  1. lspci

命令的輸出看上去想這樣:

  1. 00:00.0Host bridge:IntelCorporationHaswell-ULT DRAM Controller(rev 09)
  2. 00:02.0 VGA compatible controller:IntelCorporationHaswell-ULT IntegratedGraphicsController(rev 09)
  3. 00:03.0Audio device:IntelCorporationHaswell-ULT HD AudioController(rev 09)
  4. 00:14.0 USB controller:IntelCorporation8Series USB xHCI HC (rev 04)
  5. 00:16.0Communication controller:IntelCorporation8Series HECI #0 (rev 04)
  6. 00:1b.0Audio device:IntelCorporation8Series HD AudioController(rev 04)
  7. 00:1c.0 PCI bridge:IntelCorporation8Series PCI ExpressRootPort1(rev e4)
  8. 00:1c.1 PCI bridge:IntelCorporation8Series PCI ExpressRootPort2(rev e4)
  9. 00:1c.2 PCI bridge:IntelCorporation8Series PCI ExpressRootPort3(rev e4)
  10. 00:1c.4 PCI bridge:IntelCorporation8Series PCI ExpressRootPort5(rev e4)
  11. 00:1c.5 PCI bridge:IntelCorporation8Series PCI ExpressRootPort6(rev e4)
  12. 00:1f.0 ISA bridge:IntelCorporation8Series LPC Controller(rev 04)
  13. 00:1f.3SMBus:IntelCorporation8SeriesSMBusController(rev 04)
  14. 02:00.0Multimedia controller:BroadcomCorporationDevice1570
  15. 03:00.0Network controller:BroadcomCorporation BCM4360 802.11acWirelessNetworkAdapter(rev 03)
  16. 04:00.0 SATA controller:MarvellTechnologyGroupLtd.88SS9183PCIe SSD Controller(rev 14)

這些命令會同時列出有線和無線的網卡。你應該注意到上面的輸出中顯示我的系統中沒有有線網卡。因為我使用的是Macbook Air,它沒有以太網端口

我希望這邊文章可以幫助你找到你系統中的網卡。歡迎提出問題和建議。

更多Ubuntu相關信息見Ubuntu 專題頁面 http://www.linuxidc.com/topicnews.aspx?tid=2

Copyright © Linux教程網 All Rights Reserved