To show currently mounted partition in human readable format, use:
Another way to check partition information using parted.
sudo parted /dev/sda print
Here, we can see that the disk size is 120GB along with the partition information.
To view the list of partitions using fdisk, use:
To view the list of block devices:
Hope this helps! Cheers 🙂
This is a guide on how to check if a partition is primary in centos or not? Use the following command:
# parted /dev/sda print
# cfdisk /dev/sda
As shown above, the field under “Part Type” would suggest if that partition is Primary/Secondary.
To exit out of the cfdisk menu, use your arrow keys and move the selection to “Quit” and hit Enter in your keyboard.
As always stay Happy! Happy Blogging! 🙂