Several commands for viewing hard disk information in Linux

Viewing server hard disk information is one of the daily tasks of system administrators. This article will introduce the commands commonly used in work to view Linux hard disk information.

Lshw command
The lshw command can provide a lot of information about system hardware, while using the - C disk option allows you to view related information such as description, (device) logical name, size, etc
[ root@10 ~]# lshw -C disk
*-disk
description: ATA Disk
product: SAMSUNG MZ7WD480
vendor: Western Digital
physical id: 0.0.0
bus info: scsi@0 : 0.0.0
logical name: /dev/sda
version: 103Q
serial: S2G1NYAG305472
size: 447GiB (480GB)
capabilities: gpt-1.00 partitioned partitioned:gpt
configuration: ansiversion=5 guid=e32f30e4-5b72-4318-8181-aa60e0eef84a logicalsectorsize=512 sectorsize=512

Lsblk command
The lsblk command can list all block devices in a tree, and it collects information about the hard disk by referencing the udev database and sysfs file system
[ root@10 ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 447.1G 0 disk
├─sda4 8:4 0 430.5G 0 part /
├─sda2 8:2 0 1000M 0 part /boot
├─sda3 8:3 0 15.7G 0 part [SWAP]
└─sda1 8:1 0 1M 0 part

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Call WordPress to customize the content of article categories

If we have a custom WordPress article classification, how can we operate it separately if...

What types of websites are suitable for. ORG domain names ORG domain name suitable for scope sharing

If we are webmasters who built websites in the early days, we should know that COM, NET, and ORG...

What is a. ai domain name? Is an AI domain worth registering? Can DNSHE register an AI domain name?

The. ai domain represents one of the most important innovations of humanity, artificial...

Nginx configuration using SSL certificate method

The difference between free certificates and paid certificatesFirstly, free SSL certificates come...

Linux restart command: reboot

Linux also has its own restart command, which is very simple to use. Generally, you only need to...