Getting information on a machine's hardware in Linux
If your system supports a procfs, you can get much information of your running system. Its an interface to the kernels data structures, so it will also contain information about your hardware. For example to get details about the used CPU you could cat /proc/cpuinfo
For more information you should see the man proc.
More hardware information can be obtained through the kernel ring buffer logmessages with dmesg
. For example this will give you a short summary of recently attached hardware and how it is integreated in the system.
These are some basic "interfaces" you will have on every distribution to obtain some hardware information.
Other 'small' tools to gather hardware information are:
- lspci - PCI Hardware
- lsusb - USB Hardware
Depending on your distribution you will also have access to one of these two tools to gather a detailed overview of your hardware configuration:
- lshw
- hwinfo (SuSE specific but availible under other distributions also)
The "gate" to your hardware is thorugh the "Desktop Management Interface" (-> DMI). This framework will expose your system information to your software and is used by lshw for example. A tool to interact directly with the DMI is dmidecode and availible on the most distributions as package. It will come with biosdecode
which shows you also the complete availbile BIOS informations.
To display a nice overview of my hardware, I use lshw -short
, best run (as root). You can just run lshw
plain of course, but I prefer the conciseness that the -short
option offers.
To check my HDD usage, I use df --human-readable
, which should be available by default on your system (unlike lshw
).
Also, have a look at checking hardware on linux.
You can use 'lshw'. Install it using 'sudo apt-get install lshw' on Debian and derivatives. There's even a graphical version called lshw-gtk.