Format disk partitions
Introduction Partitions can be easily managed under Linux. You can delete and create disk partitions as needed and format in the desired filesystem so that can be later mounted and be ready for use with the help of two powerful utilities; fdisk and lsblk . Checking disk partitions fdisk can used to list partitions on attached devices. Use it without arguments to list partitions for all attached devices or you can explicitly specify the desired device: sudo fdisk -l /dev/sda > /dev/sda1 > /dev/sda2 > /dev/sda3 Deleting and re-create disk partitions Supposing that /dev/sda has 3 partition we can delete them using fdisk : sudo fdisk /dev/sda fdisk is a dialog driven utility, so it won't return to your usual prompt. Commands are buffered and will take effect only when changes are to be written to the disk. > Command (m for help): d > Command (m for help): d > Command (m for help): d Verify partitions deleted: > Command (m for help): p Cre...