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.
l small i Used to list hard disks partitions
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.
To see in human readable form run below command
SO, you can see disk partitions, their total size, used and available space and mount point of the partition in sample image.
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
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.