Probing for hardware information


The kernel creates the pseudo filesystem /sys to give access to devices and information about them. Be careful when working with /sys because attempting to edit it can seriously damage its system. It is safe, though, to use ls, grep, or any command that simply displays information in these subdirectories:

  • /sys/block: Information about block


  • /sys/bus: Subdirectories for each bus
  • /sys/class: All devices classes
  • /sys/devices: The hierarchy of all devices on the system
  • /sys/firmware: Firmware objects and their attributes
  • /sys/modules: Subdirectories for the kernel module

You can also use sysctl to view /sys, but be careful – it can also edit the contents, which can result in disaster unless you know exactly what you are doing (Figure 10).

Figure 10: The /sys pseudo filesystem contains dozens of directories and files that you can search for information.

Choosing a Tool

This article gives only an overview of the available tools. Much more can be said about most of these tools, but the point is to provide a quick guide. The purposes of these tools often overlap, so if one fails to give the information you need, another might. Whichever one you choose, don't be surprised if you need a search engine to fully understand much of the available information – you're delving deeply into the workings of your system's hardware.

The Author

Bruce Byfield is a computer journalist and a freelance writer and editor specializing in free and open source software. In addition to his writing projects, he also teaches live and e-learning courses. In his spare time, Bruce writes about Northwest coast art ( He is also cofounder of Prentice Pieces, a blog about writing and fantasy at

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy Linux Magazine

Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

Related content

  • Command Line: System Info

    The command line provides a plethora of information that you cannot obtain from the desktop.

  • I-Nex

    I-Nex is a graphical tool that quickly gives you a detailed overview of the hardware installed in your computer.

  • Inxi

    The inxi command-line tool provides useful information from the depths of the system.

  • Command Line – Probing /proc

    The mysterious /proc virtual filesystem is a rich mine of information about everything in your system.

  • Hotplugging

    Hardware which just works is what every user wants. Current Linux distributions go a long way to fulfilling that dream. In this article, we will be investigating how the hotplug system works.

comments powered by Disqus
Subscribe to our Linux Newsletters
Find Linux and Open Source Jobs
Subscribe to our ADMIN Newsletters

Support Our Work

Linux Magazine content is made possible with support from readers like you. Please consider contributing when you’ve found an article to be beneficial.

Learn More