LPIC 101.1 Determine and configure hardware settings

Weight: 2

Description: Candidates should be able to determine and configure fundamental system hardware.

Key Knowledge Areas:

  • Enable and disable integrated peripherals(n. 周边设备, 外围设备)
  • Configure systems with or without external peripherals such as keyboards
  • Differentiate between the various types of mass storage devices
  • Know the differences between coldplug and hotplug devices
  • Determine hardware resources for devices
  • Tools and utilities to list various hardware information (e.g. lsusb, lspci, etc.)
  • Tools and utilities to manipulate USB devices
  • Conceptual understanding of sysfs1, udev2, dbus3

The following is a partial list of the used files, terms and utilities:

  • /sys/
  • /proc/
  • /dev/
  • modprobe
  • lsmod
  • lspci
  • lsusb

Peripherals talk to the CPU and other peripherals on bus.
To uniquely identify hardware, the CPU address the peripheral through one or more of several means:

  • IO Port
  • IRQ - Interrupt Requests(中断请求) 4
  • DMA - Direct Memory Access 5

The two methods of viewing the current hardware list on a Linux system

  • Viewing the contents of the /proc filesystem
  • Using hardware listing tools

The /proc filesystem

/proc contains details about the hardware in the system.

cat /proc/interrupts  
cat /proc/ioports  
cat /proc/dma  

Note: In /proc directory you also find that each process on the system has a directory containing information about itself.

Hardware listing tools

lsdev gathers information about your computer's installed hardware from the interrupts, ioports and dma files in the /proc directory, thus giving you a quick overview of which hardware uses what I/O addresses and what IRQ and DMA channels.

root@myhost:~# lsdev  
Device            DMA   IRQ  I/O Ports  
------------------------------------------------
0000:00:07.1                   0170-0177   01f0-01f7   0376-0376   03f6-03f6   ffa0-ffaf  
cascade             4  
acpi                      9  
e1000                        2000-203f  
eth0                     18  
...

acpi - advanced configuration and power interface, which lets the hardware and software talk together for managing power usage

cascade - used by the hardware to let two DMA controllers talk to each other

e1000 - network driver

eth0 - network card

lspci is a utility for displaying information about PCI buses in the system and devices connected to them.

root@myhost:~# lspci |grep 07.1  
00:07.1 IDE interface: Intel Corporation 82371AB/EB/MB PIIX4 IDE (rev 01)  

lsmod Shows the kernel modules loaded, along with any dependencies for those modules.

modprobe intelligently add and remove modules from the Linux Kernel.

lsusb is a utility for displaying information about USB buses in the system and the devices connected to them.


  1. sysfs is mounted under the /sys mount point. It is a pseudo(['sʊdo] 冒充的,假的) file system designed to export the information about various kernel subsystems, hardware devices, and associated device drivers from the kernel's device model to user space through virtual files. This design no longer clutter up procfs. read more

  2. udev is a generic device manager running as a daemon on a Linux system and listening to uevents the kernel sends out if a new device is initialized or a device is removed from the system. udev work together with sysfs and tempfs.read more

  3. D-Bus or DBus is an inter-process communication (IPC) and remote procedure call (RPC) mechanism that allows communication between multiple processes concurrently running on the same machine.read more

  4. IRQ is a hardware signal sent to the processor that temporarily stops a running program and allows a special program, an interrupt handler, to run instead. read more

  5. DMA is a feature of computer systems that allows certain hardware subsystems to access RAM independently of the CPU.read more