Use parted to inspect disk labels, partitions and free space quickly and safely. 16.11.2025 | reading time: 2 min When a disk behaves oddly, read its partition table with `parted` to see disk label, partitions, sizes and flags; this guide shows how to inspect and interpret the output so you can decide the next step. Quick inspection Do it now: run `parted` to view a disk; example commands and typical output follow. ```bash sudo parted -s /dev/sdb print ``` ```text Model: Generic USB Flash Drive (scsi) Disk /dev/sdb: 3917MiB Sector size (logical/physical): 512B/512B Partition Table: gpt Disk Flags: Number Start End Size File system Name Flags 1 1049kB 106MB 105MB fat32 EFI boot, esp 2 106MB 3917MB 3811MB ext4 ``` To see free space and use human units: ```bash sudo parted /dev/sdb unit MiB print free ``` Take action safely Parted does more than show partitions: use `unit` to change units, `print free` to reveal gaps, `rescue` to try recovering a lost partition and `resizepart` or `set` to adjust partitions and flags; always back up metadata and test read-only commands first, for example `sudo parted -l` lists all devices without making changes. Complementary utilities Use `fdisk` for quick MBR edits, `gdisk` for GPT-focused work, `lsblk` and `blkid` to map devices to filesystems and UUIDs, and `hexdump` or `dd` in emergencies to inspect raw sectors; combine tools to verify before you write changes. Where to go next Mastering `parted` means you can read a disk layout, spot boot/EFI flags and identify free space; deepen that skillset by practicing on virtual disks and consider certifying your knowledge with CompTIA Linux+ or LPIC-1, and use bitsandbytes.academy for intensive exam preparation. Join Bits & Bytes Academy First class LINUX exam preparation. filesystem storage utilities boot-process troubleshooting