Linux commands you need to get your Server’s hardware Specs

So one of the things you need to do when you provision or install a server is knowing its hardware specs. Today, most of the computing resources are acquired online from one of the biggest cloud vendors. While you might get a summary of the server you are buying, the list of specs isn’t exhaustive. So here are some Linux commands you can use to get the hardware specs of your Linux server or PC.

inxi -Fxz

This is one of my favorite. It’s an all-in script that gives a much detailed list of the hardware specs of your Linux machine. You don’t even need root privileges to run it. inxi -Fxz shows Kernel specs, Processor specs, battery, graphics cards, Audio cards, Network cards, hard drives and partitions, sensors and much more.

hdparm -I /dev/XXX

Another favorite is hdparm. This command gives detailed information about harddrives on your Linux computer. It shows the hard drive’s model number, serial number, vendor or band, transport standards, size, form factor and features. It’s installed by default in most popular Linux distros, but you can also install it using your distribution’s package manager if it’s not already installed.

dmidecode

Another command I like to use is dmidecode. This command reads information from BIOS/UEFI using the SMBIOS API. It’s also installed in most Linux distros. It shows more or less the same information as inxi command above, but with a lot more detail.

This command can show your processor specs, memory, storage, network devices, PCI and more. You can specify exactly what you want to know with the -t flag. For instance for memory or RAM specs, specify with the -t memory flag.

Other notable mentions include;

  • hwinfo – gives very detailed hardware information like inxi or dmidecode, but not preinstalled in most systems. It’s available on opensuse.
  • lsusb – shows all your pluggable devices such as flash disks, external harddives, mouse, keyboard and whatever is plugged in through USB port.
  • lspci – list of all attached devices to PCI bus.
  • free – shows how much free memory you have on your server.
  • fdisk – shows hard drives partitions on your system
  • lsblk and blkid – show block devices or rather hard drives and their partitions on your system.
lsblk and blkid commands

Leave a Reply

Your email address will not be published. Required fields are marked *