How to get the number of physical disks in Linux?

linux-600x300

 

fdisk -l command shows the disks and a bunch of stats about them, including the partitions.

The disks are generally in the form of /dev/sdx and partitions /dev/sdxn, where x is a letter and n is a number (so sda is the first physical disk and sda1 is the first partition on that disk).

df -h command gives the size and usage stats per partition.

df shows the usage in blocks, with it it’s human readable.

if you are not a super user then you have to use sudo command in-front of the fdisk command.

Please follow and like us:
0

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *

Time limit is exhausted. Please reload the CAPTCHA.