How to view if partitions primary or secondary in Linux

How do I view my partitions if they are primary or secondary in Linux CentOS? I tried df -T but it does not show if partitions are primary or secondary.


Use the cfdisk command.

cfdisk /dev/sda

Use this command: sudo parted /dev/sda followed by print. It outputs:

GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print                                                            
Model: ATA WDC WD10JPVX-60J (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos
Disk Flags: 

Number  Start   End    Size    Type      File system  Flags
 1      1049kB  525MB  524MB   primary   ntfs
 2      525MB   132GB  131GB   primary   ntfs         boot
 3      132GB   461GB  329GB   primary   ntfs
 4      461GB   966GB  505GB   extended               lba
 6      461GB   566GB  105GB   logical   ext4
 5      566GB   896GB  330GB   logical   ntfs
 7      896GB   966GB  70.0GB  logical   ext4

You can check if the partition is primary or extended from this. Hope this helps!