Under modern Linux desktop environments, file systems are automatically mounted under
/media when you try to access them.
For example, let’s say you’re logged in as user
jonas, and have a removable disk attached where the file system label is
work. In, for example, Ubuntu,
work will show up in the left pane of your file explorer, and when you click on it, it’s automatically mounted under
/etc/fstab or the
mount command to mount a file system, interferes with this setup. Your desktop environment will no longer know where your file system is mounted, it might not show up in the pane of your file explorer, and it might not unmount without providing root access.
Instead, you can use the
udisksctl command, which integrates nicely with the desktop environment in Ubuntu. For example,
udisksctl mount --block-device /dev/disk/by-label/work
will automatically mount your device under
/media/jonas/work. It will still show up in the pane in your file explorer, and you can unmount it without providing root privileges.
This way, you can automate the mounting of file systems; for example, to mount them at login.
/dev/disk/by-label contains an entry for each unmounted file system, and can be used in the classic
mount command as well, instead of the usual
See also: Mounting file systems by label in Linux