How to check if a disk has MBR or GPT type partition?

MBR

sudo parted /dev/sda print | grep Table
Partition Table: msdos

GPT

sudo parted /dev/sda print | grep Table
Partition Table: gpt
Advertisements