In the Linux Operating System, devices connect to the system through device files, which contain all the information an OS needs to control the specified device.

  • /etc/sysconfig/hwconf: Hardware configuration and listing of system

Benefits of Device Files

  • Introduces greater flexibility: The OS is independent of specific details for managing a particular device. Hence changing the device does not require the change of the whole system.
  • All specifics handled by the device file: The OS informs about tasks to the device, and the device files provide the details.
  • Easy To Install New Device: Required device file, software configuration provided by configuration tool, and kernel support. The support for new devices is already compiled and built into the Kernel.
  • Dynamically handled: The system detects the device and creates device files. The device files are generated as needed by udev and managed by HAL hotplug system. Thus, leading to minimum device files in the /etc/dev directory.

Configure Devices Automatically

The Linux makes the devices structurally hot plugged as more and more devices are now removable i.e., attached temporarily. Their configuration is dynamically detected.

/proc file system

  • An older process file system used to maintain information about kernel processes, including devices.
  • It lists kernel information including device information
  • /proc/devices: Lists device drivers configured and installed character & block devices along with their major numbers for the currently running kernel.
  • interrupts, dma & ioports files: Lists currently used IRQs, DMSs and I/O ports
  • /proc/dma: displays the currently used DMA channels
  • /proc/interrupts: displays in use IRQs
  • /proc/ioports: shows in use I/O ports
  • /proc/pci: lists PCI devices
  • /proc/ascound: lists sound devices and detailed information about the sound card
  • /proc/ide: directory for IDE devices
  • /proc/net: directory for network devices

sysctl tool (Kernel Tuning in the System Tools menu) to change or modifying values like IP packet forwarding, maximum number of files.

sysfs device file system

  • It is a virtual file system that maintains configuration device information for all devices on the system.
  • It provides a hierarchical map of kernel-supported devices like PCI devices, buses, and block devices supported by kernel modules.
  • Located at /sys and holds detailed information about system devices to be used by hotplug tools to create a device interface, as needed. It is beneficial for dynamically managing & configuring removal devices.
  • classes subdirectory: lists all supported devices and manage them into different categories like net and sound devices
  • systool (a part of sysfutils package) displays listing of installed devices

>> Next Page: udev tool