Parse a partition table and tell the kernel about it. More information: https://manned.org/partx.
sudo partx --list path/to/device_or_disk_image
sudo partx --add --verbose path/to/device_or_disk_image
sudo partx --delete path/to/device_or_disk_image