UDISKIE(8)

πŸŽ€ UDISKIE(8) β€” automounter for removable media πŸŽ€

okay bestie, welcome to the UDISKIE(8) manual page for udiskie β€” aka the Unix-side main character of removable media. Let’s get into it. πŸ’…

🌸 NAME 🌸

udiskie β€” automounter for removable media

✨ SYNOPSIS ✨

udiskie [OPTIONS]

udiskie-mount [OPTIONS] (-a | DEVICE...)

udiskie-umount [OPTIONS] (-a | PATH...)

πŸ’– DESCRIPTION πŸ’–

udiskie is an udisks2 front-end written in python. Its whole main-character purpose is automatically mounting removable media, like CDs or flash drives. <emoji>πŸ’Ώ</emoji>✨

It also has optional mount notifications, a GTK tray icon, and user level CLIs for manual mount and unmount operations. The media gets mounted in a new directory under /media or /run/media/USER/, using the device name if possible. slay. 🫢

🫢 COMMON OPTIONS 🫢

  • -h, --help β€” show the help message and exit.
  • -V, --version β€” show help message and exit.
  • -v, --verbose β€” verbose output.
  • -q, --quiet β€” quiet output.
  • -c FILE, --config=FILE β€” specify the config file.
  • -C, --no-config β€” don’t use any config file.

πŸ” SHARED MOUNT AND DAEMON OPTIONS πŸ”

  • -p COMMAND, --password-prompt=COMMAND β€” password retrieval command. The string is formatted with the device attributes as keyword arguments, e.g.:
-p "zenity --entry --hide-text --text 'Enter password for {device_presentation}:'"
  • -P, --no-password-prompt β€” disable unlocking of LUKS devices.

🧚 DAEMON OPTIONS 🧚

  • -a, --automount β€” enable automounting new devices (default).
  • -A, --no-automount β€” disable automounting new devices.
  • -n, --notify β€” enable pop-up notifications (default).
  • -N, --no-notify β€” disable pop-up notifications.
  • -t, --tray β€” show tray icon.
  • -s, --smart-tray β€” show tray icon that automatically hides when there is no action available.
  • -T, --no-tray β€” disable tray icon (default).
  • -f PROGRAM, --file-manager=PROGRAM β€” set program to open mounted directories. Default is 'xdg-open'. Pass an empty string to disable this feature.
  • -F, --no-file-manager β€” disable browsing.
  • --terminal=PROGRAM β€” set terminal command line to open mounted directories. Default is none! Pass an empty string to disable this feature.
  • --no-terminal β€” disable terminal action.
  • --appindicator β€” use AppIndicator3 for the status icon. Use this on Ubuntu/Unity if no icon is shown.
  • --no-appindicator β€” use Gtk.StatusIcon for the status icon (default).
  • --password-cache MINUTES β€” cache passwords for LUKS partitions and set the timeout.
  • --no-password-cache β€” never cache passwords (default).
  • --event-hook COMMAND β€” command to execute on device events. Command string be formatted using the event name and the list of device attributes (see below), e.g.:
--event-hook "zenity --info --text '{event}: {device_presentation}'"
  • --no-event-hook β€” no notify command (default).

🌈 MOUNT OPTIONS 🌈

  • -a, --all β€” mount all handled devices.
  • -r, --recursive β€” recursively mount cleartext partitions after unlocking a LUKS device. This will happen by default when running the udiskie daemon.
  • -R, --no-recursive β€” disable recursive mounting (default).
  • -o OPTIONS, --options=OPTIONS β€” set mount options.

πŸ¦‹ UNMOUNT OPTIONS πŸ¦‹

  • -a, --all β€” unmount all handled devices.
  • -d, --detach β€” detach drive by e.g. powering down its physical port.
  • -D, --no-detach β€” don’t detach drive (default).
  • -e, --eject β€” eject media from the drive, e.g CDROM.
  • -E, --no-eject β€” don’t eject media (default).
  • -f, --force β€” force removal (recursive unmounting).
  • -F, --no-force β€” don’t force removal (default).
  • -l, --lock β€” lock device after unmounting (default).
  • -L, --no-lock β€” don’t lock device.

πŸ“ EXAMPLE USAGE πŸ“

Start udiskie in ~/.xinitrc:

udiskie &

Unmount media and power down USB device:

udiskie-umount --detach /media/Sticky

Mount all media:

udiskie-mount -a

Mount /dev/sdb1:

udiskie-mount /dev/sdb1

πŸ‘‘ CONFIGURATION πŸ‘‘

The file .config/udiskie/config.yml can be used to configure defaults for command line parameters and customize further settings. The actual path may differ depending on $XDG_CONFIG_HOME. The file format is YAML, see https://en.wikipedia.org/wiki/YAML. If you don’t want to install PyYAML, it is possible to use an equivalent JSON file with the name config.json instead. <emoji>πŸ¦‹</emoji>

# This is an example (nonsense) configuration file for udiskie.

program_options:
  # Configure defaults for command line options

  tray:             auto    # [bool] Enable the tray icon. "auto"
                            # means auto-hide the tray icon when
                            # there are no handled devices.

  menu:             flat    # ["flat" | "nested"] Set the
                            # systray menu behaviour.

  automount:        false   # [bool] Enable automatic mounting.

  notify:           true    # [bool] Enable notifications.

  password_cache:   30      # [int] Password cache in minutes. Caching is
                            # disabled by default. It can be disabled
                            # explicitly by setting it to false

  file_manager:     xdg-open
    # [string] Set program to open directories. It will be invoked
    # with the folder path as its last command line argument.

  terminal:         'termite -d'
    # [string] Set terminal command line to open directories. It will be
    # invoked with the folder path as its last command line argument.

  password_prompt: ["gnome-keyring-query", "get", "{id_uuid}"]
    # [string|list] Set command to retrieve passwords. If specified
    # as a list it defines the ARGV array for the program call. If
    # specified as a string, it will be expanded in a shell-like
    # manner. Each string will be formatted using `str.format`. For a
    # list of device attributes, see below. The two special string values
    # "builtin:gui" and "builtin:tty" signify to use udiskie's
    # builtin password prompt.

  event_hook: "zenity --info --text '{event}: {device_presentation}'"
    # [string|list] Set command to be executed on any device event.
    # This is specified like `password_prompt`.

device_config:

  # List of device option rules. Each item can match any combination of device
  # attributes. Additionally, it defines the resulting action (see below).
  # Any rule can contain multiple filters (AND) and multiple actions.
  # Only the first matching rule that defines a given action is used.
  # The rules defined here are simply prepended to the builtin device rules,
  # so that it is possible to completely overwrite the defaults by specifying
  # a catch-all rule (i.e. a rule without device attributes).
  # Filter rules can be passed a list of values, in which case the rule is matched
  # if the attribute matches any of the values in the list.

- device_file: /dev/dm-5    # [filter]
  ignore:      false        # [action] never ignore this device
- id_uuid:                  # [filter] match by device UUID
  - 9d53-13ba               # This rule matches on either of these uids
  - 8675-309a
  options: [noexec, nodev]  # [action] mount options can be given as list
  ignore:  false            # [action] never ignore this device (even if fs=FAT)
  automount: false          # [action] do not automount this device
- id_type: vfat             # [filter] match file system type
  ignore:  true             # [action] ignore all FAT devices

- id_type: ntfs             # [filter] (optional)
  skip: true                # [action] skip all further (even builtin) rules
                            # for all matched devices, and resolve action result
                            # on parent device

- ignore:    true           # never mount/unmount or even show this in the GUI
  automount: false          # show but do not automount this device
  options: []               # additional options to be passed when mounting

- id_uuid: ...              # [filter] match device by UUID
  keyfile: /path/to/keyfile # [action] use keyfile to unlock a luks encrypted
                            # device, bypassing the password prompt

  mount_options:              # [deprecated] do not use
  ignore_device:              # [deprecated] do not use

  notifications:
    # Customize which notifications are shown for how long. Possible
    # values are:
    #   positive number         timeout in seconds
    #   false                   disable
    #   -1                      use the libnotify default timeout

    timeout:          1.5     # set the default for all notifications

    # Specify only if you want to overwrite the default:
    device_mounted:   5       # mount notification
    device_unmounted: false   # unmount notification
    device_added:     false   # device has appeared
    device_removed:   false   # device has disappeared
    device_unlocked:  -1      # encrypted device was unlocked
    device_locked:    -1      # encrypted device was locked
    job_failed:       -1      # mount/unlock/.. has failed

  quickmenu_actions: [mount, unmount, unlock, terminal, detach, delete]
    # List of actions to be shown in the quickmenu or the special value 'all'.
    # The quickmenu is shown on left-click if using flat menu type.

  notification_actions:
    # Define which actions should be shown on notifications. Note that there
    # are currently only a limited set of actions available for each
    # notification. Events that are not explicitly specified show the default
    # set of actions. Specify an empty list if you don't want to see any
    # notification for the specified event:

    device_mounted:   [browse]
    device_added:     [mount]

  icon_names:
    # Customize the icon set used by the tray widget. Each entry
    # specifies a list of icon names. The first installed icon from
    # that list will be used.

    media:   [drive-removable-media, media-optical]
    browse:  [document-open, folder-open]
    terminal: [terminal, terminator, xfce-terminal]
    mount:   [udiskie-mount]
    unmount: [udiskie-unmount]
    unlock:  [udiskie-unlock]
    lock:    [udiskie-lock]
    eject:   [udiskie-eject, media-eject]
    detach:  [udiskie-detach]
    delete:  [udiskie-eject]
    quit:    [application-exit]

All keys are optional. Reasonable defaults are used if you leave them unspecified. <emoji>πŸ’œ</emoji>

🧩 DEVICE ATTRIBUTES 🧩

Okay so some of the config entries use what we call Device attributes β€” think of them as little vibe-checks you can run on a device to ask "hey, are you a drive? do you have a label? are you, like, mounted rn?"

Here's the list that's currently available β€” but bestie, listen: there is no guarantee that they will remain available πŸ™ˆ so don't go building your whole personality on them, k?

  • is_drive β€” no hint given, she's mysterious πŸ’…
  • is_block β€” no hint given either
  • is_partition_table β€” nope, no hint
  • is_partition β€” still no hint
  • is_filesystem β€” no hint, just vibes
  • is_luks β€” no hint
  • is_loop β€” no hint
  • is_toplevel β€” no hint
  • is_detachable β€” no hint
  • is_ejectable β€” no hint
  • has_media β€” no hint
  • device_file β€” block device path, e.g. "/dev/sdb1"
  • device_presentation β€” display string, e.g. "/dev/sdb1"
  • device_size β€” block device size
  • device_id β€” unique, persistent device identifier
  • id_usage β€” E.g. "filesystem" or "crypto"
  • is_crypto β€” no hint
  • is_ignored β€” no hint
  • id_type β€” E.g. "ext4" or "crypto_LUKS"
  • id_label β€” device label
  • id_uuid β€” device UUID
  • is_luks_cleartext β€” no hint
  • is_external β€” udisks flag HintSystem=false
  • is_systeminternal β€” udisks flag HintSystem=true
  • is_mounted β€” no hint
  • mount_paths β€” list of mount paths
  • mount_path β€” any mount path
  • is_unlocked β€” no hint
  • in_use β€” device or any of its children mounted
  • should_automount β€” no hint
  • ui_label β€” no hint (yes, the ui_ ones are also just mysteriously hintless)
  • loop_file β€” file backing the loop device
  • setup_by_uid β€” user that setup the loop device
  • autoclear β€” automatically delete loop device after use
  • symlinks β€” no hint
  • drive_model β€” no hint
  • drive_vendor β€” no hint
  • drive_label β€” no hint
  • ui_device_label β€” no hint
  • ui_device_presentation β€” no hint
  • ui_id_label β€” no hint
  • ui_id_uuid β€” no hint

πŸ‘€ SEE ALSO πŸ‘€

  • udisks(1) β€” the main character whose lore we're all referencing 🫢

And the official site, go be nosy:

https://www.freedesktop.org/wiki/Software/udisks/

πŸ’Œ CONTACT πŸ’Œ

Got an issue? Got a question? Got a "bestie what if you added…" feature idea? 🌸 You can totally use the github issues for any of that β€” reporting issues you encounter, asking general questions, or suggesting new features. And if you don't have github, or just don't like it (valid, honestly), you can reach out by email instead:

https://github.com/coldfix/udiskie/issues

thomas@coldfix.de
Go off, file that issue, she's literally waiting for it πŸ“¬

And that's the whole page, bestie β€” you ate that πŸ’…βœ¨ This iconic little manual is udiskie, dated 08/07/2026, from the UDISKIE(8) corner of the universe. Go unmount something responsibly πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from