lsblkblkidmountumounteject/run/media/username/ when the desktop mounts it automatically.# List block devices in a tree, showing partitions and mount points lsblk # Example output NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 20G 0 disk ├─sda1 8:1 0 1G 0 part /boot └─sda2 8:2 0 19G 0 part / sdb 8:16 1 32G 0 disk └─sdb1 8:17 1 32G 0 part # Show filesystem type and label/UUID for each device blkid # Show only currently mounted filesystems findmnt
1 in the RM column marks removable media.lsblk first.# Create a mount point if one doesn't already exist sudo mkdir -p /mnt/usbdrive # Mount a partition at that mount point sudo mount /dev/sdb1 /mnt/usbdrive # Confirm it mounted successfully df -h /mnt/usbdrive # Work with files normally, as though it were any other directory ls /mnt/usbdrive # Unmount when finished — always do this before removing the device sudo umount /mnt/usbdrive # Alternative: unmount by mount point OR by device name sudo umount /dev/sdb1
umount fails while the file system is in use, such as when your shell's working directory is inside it. cd elsewhere, close programs using it, and retry.In GNOME, the desktop's storage service detects removable media, mounts it under /run/media/username/, and usually offers to open the file manager.
# Confirm where the desktop auto-mounted a device lsblk # MOUNTPOINT column will show something like: # /run/media/student/MYUSBDRIVE
mount.File systems buffer writes in memory. Removing media before unmounting can leave data partly written.
# Ensure all pending writes are flushed to disk sync # Unmount before physically removing the device sudo umount /mnt/usbdrive # Eject optical media or safely power down a removable drive eject /dev/sdb
lsblk column quickly identifies removable devices?/mnt/data and mount /dev/sdb1 there?