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

How to change the root user password of Linux operating system

Changing the root user password of the Linux operating system is a critical operation, please...

Requirements and usage suggestions for. app domain registration

.app域名是由Google推出的顶级域名(TLD),旨在提供安全的在线体验。作为.app域名的管理机构,Google要求所有.app域名都必须使用HTTPS来加密数据传输,以确保用户隐私和安全...

Linux restart command: reboot

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

Method for modifying server hostname in Linux system

How to modify the hostname in LinuxHow to modify the Linux hostname? You can temporarily modify...

Call WordPress to customize the content of article categories

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