18 C
Texas
Muhammad Nabeel
Network and System Administrator

How to Check Hard Disk and Partition Information in Linux

In this article, we will discus that how to use different commands to see hard disks and the partitions on the Linux server. It is very important that you as a system administrator know about your server hard disk information like its partitions, consumed space and its filesystem.

1- fdisk command

fdisk is a command-line utility that provides disk partitioning functions. It is used to create, modify or delete the partitions on the linux systems. Use following command to list all hard disks and their partitions.

fdisk -l

l small i Used to list hard disks partitions

- Advertisement -

you can see sample output in below image.

2- df command

df (disk free) is a Unix command used to display the amount of available disk space for file systems. It show File System Disk Space Usage and mount point of partitions.

df

To see in human readable form run below command

df -h

SO, you can see disk partitions, their total size, used and available space and mount point of the partition in sample image.

3- Parted

Parted is another popular command line utility which allows you to manage hard disks partitions. In this article we will use parted command to see all available hard disks with their size, available and used space of hard disks and created partitions on the hard disks.

use following command to list hard disks and their partitions on the system

parted -l

4- sfdisk

So it is one more command which we use to list partitions and hard drives. Tt is very similar to fdisk command. It shows both physical and logical (virtua;l) volumes, It provides “summary” of physical volumes, partitions information with the start and end cylinders, total blocks, size and File systems.

sfdisk -l

That’s it.

Click here if you want to learn that how to create SWAP on linux

- Advertisement -
Everything Linux, A.I, IT News, DataOps, Open Source and more delivered right to you.
Subscribe
"The best Linux newsletter on the web"

LEAVE A REPLY

Please enter your comment!
Please enter your name here



Latest article