As Marius says: hardware is detected by the kernel at boot time, or later if it's "pluggable" (USB, etc.). When the hardware is recognized, the related kernel module (driver) will be loaded and in most cases userspace will be notified via dbus/udev to determine what to do with that hardware; udev has a set of "rules" that specify what to do with certain types of hardware. E.g. "if the detected hardware is an USB printer, add it to the print server (CUPS)" is an example of such rule, and it would look something like this:
# Low-level USB device add trigger
ACTION=="add", SUBSYSTEM=="usb", ATTR{bInterfaceClass}=="07", ATTR{bInterfaceSubClass}=="01", RUN+="udev-configure-printer add %p"
# usblp device add trigger (needed when usblp is already loaded)
ACTION=="add", KERNEL=="lp*", RUN+="udev-configure-printer add %p"
The above is part of /lib/udev/rules.d/70-printers.rules
(at least, on 10.10), which also includes a rule for removing the printer from CUPS if you unplug it.
BTW: USB class 7 are USB printers.
In some cases you might have to change some configuration files, but that would be considered a bug or a necessary workaround (some hardware is impossible or difficult to detect).
If your hardware as open drivers for Ubuntu, they will be install with Ubuntu. If there is driver from HP, you can find them into your Setting->Additional drivers.
This is Jockey, and it will let you know which drivers are available for your hardware. Just select which one you want and click Install.
Best Answer
There are a few options:
lspci
will show you most of your hardware in a nice quick way. It has varying levels of verbosity so you can get more information out of it with-v
and-vv
flags if you want it. The-k
argument is a good way to find out which kernel driver a piece of hardware is using.-nn
will let you simply know the hardware ID which is great for searching.But it is only a very simple, quick way of getting a list of hardware. I often ask people to post the output of it here when trying to identify their wireless hardware. It's great for things like that.
It doesn't show USB hardware other than the USB busses.
Here are three real world examples:
Graphics:
Audio:
Networking:
lsusb
is likelspci
but for USB devices. Similar functionality with similar verbosity options. Good if you want to know what's plugged in.sudo lshw
will give you a very comprehensive list of hardware and settings.It gives you so much information, I suggest you pipe it through
less
or output it to a file and open that in something you can move around in:Of course this is usually a lot of information. You often only need info on a small subset of your hardware and
lshw
will let you select a category. If you just wanted to see your network devices, for example, run this:If you want something graphical, I suggest you look at
hardinfo
. You'll need to install it first:You then just run it from the same terminal with
hardinfo
. I don't know that it has a menu location by default.But it can give you slightly more information (boots, available kernels, etc) than the other options, as well as giving you similar lists of PCI and USB hardware like the first two commands.
It also provides some simple benchmarking. I think the developers aim to make it a replacement for Sandra (a popular Windows hardware information gathering tool).
It even has options to output a nice report that you can send to somebody (though it can easily be too much information).