Mount and Eject USB Drives with udisksctl
Mount a USB partition to /media with udisksctl mount, unmount it safely, and power off the drive for physical removal.
Run `udisksctl mount -b /dev/sdb1` to mount a USB partition with your user's permissions, and `udisksctl unmount -b /dev/sdb1` before unplugging.
01Command
Command
$ udisksctl mount -b /dev/sdb102What it does
Unlike `sudo mount`, udisksctl goes through the same udisks2 service your file manager uses, so the mount lands in /media/<you>/<label> with correct ownership — no fstab entry, no root. `udisksctl power-off -b /dev/sdb` spins the drive down so the LED goes dark, the true 'safe to remove' step. Check device names first with `lsblk` — mounting the wrong partition is harmless but confusing.
03Risk
!Warning: Never unmount or power off while a copy is running: file writes may still be cached, and pulling power mid-write can corrupt the filesystem.
04Undo
Undo
$ udisksctl unmount -b /dev/sdb105Sources
- udisksctl(1) - Linux manual pageEvidence: udisksctl mount/unmount mounts block devices via the udisks2 D-Bus service, giving active users access without root, and power-off powers down the drive.
Last verified: 2026-09-18 · Category: System & Settings