The default name is /run/media/$USER/<UUID>. Instead of UUID, I want it to use the partlabel (if it exists), which means I want to change the mountpoint's name to /run/media/$USER/<partlabel>.

I was hoping that it is possible by adding a rule (file) in the directory /etc/udev/rules.d. Can you tell me what to put in the file?

Edit -
This is what is in my rules file. As far as I know, this is the default configuration and there is no effect if it is removed.

# ==1: mount filesystem to a shared directory (/media/VolumeName)
# ==0: mount filesystem to a private directory (/run/media/$USER/VolumeName)
# See udisks(8)
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{UDISKS_FILESYSTEM_SHARED}="0"

2 Answers 2


Assuming that I've understood the udisks(8) man page, the default udisks rules and my Debian 10 system is comparable to yours, the essential part should be this:


The PARTLABEL of e.g. blkid output seems to be known as ENV{PARTNAME} in udev, or you can use ENV{ID_PART_ENTRY_NAME} if you want spaces escaped (i.e. a single space character will become \x20).

  • I've checked if it was working using udevadm info, the variable UDISKS_NAME DOES get set to the expected value. However, the mountpoint still stays the same, i.e. /run/media/$USER/<UUID> (or /run/media/$USER/VolumeName as they call it).
    – nomad
    Oct 1, 2020 at 5:12

It is currently not possible to choose custom name for the mountpoint. UDISKS_NAME mentioned by @telcoM is used only as a hint for the UDisks API users when displaying name of the device -- for example Nautilus/GVFS in GNOME will use it when displaying the mounted devices -- but not for the mountpoint itself. Name for the mountpoint is hardcoded and it will be either filesystem label or UUID. Feel free to report issue against UDisks, using partition label as a third option here sounds like a good idea.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .