2 Discovering the hardware

lspci and lsusb are two commands to display information about PCI devices and USB devices that are connected to a host. Use man to learn all the details of these two commands, as there are many options that apply to these commands. These commands can be used without any options.

If you want to use lsusb (for a USB connected NIC), you need to have usbfs mounted. It is not always mounted, depending on individual distributions.

A useful line of lspci output is as follows:

01:08.0 Ethernet controller: Intel Corporation 82801G (ICH7 Family) LAN Controller (rev 01)  
  

A useful line of lsusb output is as follows:

Bus 001 Device 004: ID 0bda:8189 Realtek Semiconductor Corp. RTL8187B Wireless 802.11g 54Mbps Network Adapter  
  

It is important to remember the chipset of your NIC, as that determines whether it is supported by your kernel or not.

A more powerful command is hwinfo. You need to install a package of the same name to use this command. You should run this command using sudo (or otherwise as root), and pipe its output to less:

sudo hwinfo | less  
  

It gives you information about all the hardware devices in your system, not just limited to NICs. If you only want to display NICs, use the --network option.

If a NIC is reported by hwinfo, its driver is already loaded. You need to use lspci and lsusb to discover NICs that are not automatically recognized by the system.