Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In my understanding linux can list only those devices which it can understand, i.e. for which the drivers have been installed. I think lspci is the command for that.

But how can one figure out if there exists some device in the system for which the drivers are not installed and perhaps some hint about what that device is for and what driver would suffice for it.

I would like to know this info so as to be able to recompile my linux kernel to a minimum and would like to avoid a hit and trial approach.

share|improve this question

closed as off topic by Michael Hampton, Scott Pack, HopelessN00b, Ward, Zoredache Oct 9 '12 at 21:51

Questions on Server Fault are expected to relate to server, networking, or related infrastructure administration within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.If this question can be reworded to fit the rules in the help center, please edit the question.

No. lspci shows all devices. Regardless of drivers. – Hennes Oct 4 '12 at 17:15
@Hennes So how is it able to output the device name string, if it can't talk to the device in the absence of driver? – pareshverma91 Oct 4 '12 at 17:27
Your computer does not need a specific driver just to 'ask' a device for its ID. There is a standarised way for the OS to do this query. Once it knows which device it is it can select a driver to talk to it. No such driver means no working hardware, but it is still able to list which hardware you got. – Hennes Oct 4 '12 at 17:36
up vote 3 down vote accepted

lspci will do the trick as said by several others.

Some additional clarification:

Every modern bus-interface (Vesa Local Bus, PCMCIA, CardBus, PCI, PCI-X, PCI-e, Thurderbolt, IDE, ATAPI, SATA, USB, Firewire, just to name a few that come to mind) defines a set of low-level probe commands so the OS can detect which devices (if any) are present on that bus.

Such commands return a device-id to the OS. The OS then compares this id with the id's that the drivers "advertises" as id's that they feel capable of handling.
This is a necessity as otherwise the OS would have no way to determine what is present in the machine. If the OS can't tell what is there, it has no way of matching a device with the required driver.

(The above is true for any modern OS. Linux, Windows and OSX do exactly the same thing.)

Back to Linux:
The drivers for the OS to do this are part of the core-drivers for the various interface-buses that need to be present in the kernel (or as a loadable module).
Of course: Any bus-interface/device-drivers required to boot and load the root file-system need to be in the kernel at boot-time. Anything else can be a module if you want to keep the size of the kernel down, or omitted altogether if such hardware isn't in the system at all.
Typical first-time mistake is to make ALL file-sytem drivers modules. You will need at least 1 of them to be able to load the root-filesystem.

share|improve this answer

lspci -v will show the connected devices, even if there's no corresponding driver.

share|improve this answer
So how is it able to output the device name string, if it can't talk to the device in the absence of driver? – pareshverma91 Oct 4 '12 at 17:17
It gets a long number from the device. Part of that it manufacturer ID (e.g. all intel PCI devices start with 8086 as their ID), part of it is the type of card. This last number can be looked up in a table. This table is just a list of numbers, nothing more. – Hennes Oct 4 '12 at 17:30
@Hennes yes, that makes sense. Thanks – pareshverma91 Oct 4 '12 at 17:39

I also like the lshw on those distributions to offer it.

Lots of good information about your CPUs, memory slots, USB slots, disks, and more.

share|improve this answer

If you want extended information of all hardware, you can use dmidecode command. It dumps the DMI table contents.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.