commands.sh

partx

linux

Parse a partition table and tell the kernel about it.

More info →

Options (4)

-l, --listboolean

List the partitions on a block device or disk image

Example: sudo partx {{[-l|--list]}} {{path/to/device_or_disk_image}}
-a, --addboolean

Add all the partitions found in a given block device to the kernel

Example: sudo partx {{[-a|--add]}} {{[-v|--verbose]}} {{path/to/device_or_disk_image}}
-v, --verboseboolean

Add all the partitions found in a given block device to the kernel

Example: sudo partx {{[-a|--add]}} {{[-v|--verbose]}} {{path/to/device_or_disk_image}}
-d, --deleteboolean

Delete all the partitions found from the kernel (does not alter partitions on disk)

Example: sudo partx {{[-d|--delete]}} {{path/to/device_or_disk_image}}

Examples (3)

List the partitions on a block device or disk image

sudo partx [-l|--list] path/to/device_or_disk_image

Add all the partitions found in a given block device to the kernel

sudo partx [-a|--add] [-v|--verbose] path/to/device_or_disk_image

Delete all the partitions found from the kernel (does not alter partitions on disk)

sudo partx [-d|--delete] path/to/device_or_disk_image
made by @shridhargupta | data from tldr-pages