fdisk -l | grep Disk | egrep '/sd'
Tested on Ubuntu 20.04
Using udisks2: Detach a disk with udisks2:
udisksctl unmount -b /dev/sdXY udisksctl power-off -b /dev/sdXExample if my drive is /dev/sdb1:
udisksctl unmount -b /dev/sdb1 udisksctl power-off -b /dev/sdbSimilarly to above, power-off can be used to detach the drive even if there are no partitions mounted, or no partition was ever mounted:
udisksctl power-off -b /dev/sdb2)
No comments:
Post a Comment