14 commands to check Hardware Information

Now here have you a little overview about a lot of more commands, this commands works for the most Linux Distributions ( such as Debian based or other).

You become here the commands with a little Image for Pisi Linux so that you can see it works, and Pisi Linux give you Hardware Information such as the most Linux Distributions.

1. lscpu

The lscpu command reports information about the cpu and processing units. It does not have any further options or functionality.

 

lscpu

 

2. lshw – List Hardware

A general purpose utility, that reports detailed and brief information about multiple different hardware units such as cpu, memory, disk, usb controllers, network adapters etc. Lshw extracts the information from different /proc files.

lshw

3.lspci – List PCI

The lspci command lists out all the pci buses and details about the devices connected to them.

The vga adapter, graphics card, network adapter, usb ports, sata controllers, etc all fall under this category.

 

lspci

 

 

Filter out specific device information with grep.

$ lspci -v | grep “VGA” -A 12

 

 

lspci-v

 

4. lsscsi – List scsi devices

Lists out the scsi/sata devices like hard drives and optical drives.

Note for this command you must install in Pisi Linux 1.2 the package lsscsi, simple with the command:

$ sudo pisi it lsscsi

lsscsi

 

5. lsusb – List usb buses and device details

This command shows the USB controllers and details about devices connected to them. By default brief information is printed. Use the verbose option “-v” to print detailed information about each usb port

 

lsusb

 

On the above Image you can see, 1 usb port is being used by the mouse, and one i using by the Keyboard

.6. Inxi

Inxi is a 10K line mega bash script that fetches hardware details from multiple different sources and commands on the system, and generates a beautiful looking report that non technical users can read easily.

$ inxi -Fx

inxi-fx

 

7. lsblk – List block devices

List out information all block devices, which are the hard drive partitions and other storage devices like optical drives and flash drives

lsblk

8. df – disk space of file systems

Reports various partitions, their mount points and the used and available space on each.

 

df-h

 

9. fdisk

Fdisk is a utility to modify partitions on hard drives, and can be used to list out the partition information as well.

 

sudo-fdisk-l

 

Fdisk is a utility to modify partitions on hard drives, and can be used to list out the partition information as well.

10. mount

The mount is used to mount/unmount and view mounted file systems.

 

mount

 

And again, use grep to filter out only those file systems that you want to see

$ mount | column -t | grep ext

 

mount-grep

 

 

11. free – Check RAM

Check the amount of used, free and total amount of RAM on system with the free command.

 

free

 

12. dmidecode

The dmidecode command is different from all other commands. It extracts hardware information by reading data from the SMBOIS data structures (also called DMI tables).

display information about the processor/cpu

$ sudo dmidecode -t processor

# memory/ram information

$ sudo dmidecode -t memory

# bios details

$ sudo dmidecode -t bios

 

dmidecode

 

 

13. /proc files

Many of the virtual files in the /proc directory contain information about hardware and configurations. Here are some of them

CPU/Memory information

# cpu information

$ cat /proc/cpuinfo

# memory information

$ cat /proc/meminfo

cat

 

Linux/kernel information

 

cat1

 

SCSI/Sata devices

 

cat2

 

Partitions

 

cat3

 

14. hdparm

The hdparm command gets information about sata devices like hard disks.

 

hdparm-i

 

Each of the command has a slightly different method of extracting information, and you may need to try more than one of them, while looking for specific hardware details. However they are available across most linux distros, and can be easily installed from the default repositories.

On the desktop there are gui tools, for those who do not want to memorise and type commands. Hardinfo, I-nex are some of the popular ones that provide detailed information about multiple different hardware components.

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s