Are there any common actions that user have to do after installing new hardware? Is Ubuntu makes some hardware-dependent adjustments during installation (except generation of /etc/fstab file), that user should do when changing any device, like motherboard, graphic card or other? Methods of detection hardware in Ubuntu is not clear for me. What I can read about it?

I have not real problems right now, but I would like to know what to do when it happen.

(PS: Do you understand me? :-) I am not a native english speaker and it is my first experience, please comment my mistakes :-)


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).


As a rule, no. Ubuntu detects the computer's hardware during bootup, or when the hardware is plugged in.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy