Skip to content
ilioscio edited this page Jan 28, 2025 · 1 revision

Starting Udiskie

The udiskie daemon must be running for automounting to function, the most common way to run udiskie as a daemon is by adding this to your window manager's startup applications (consult your window manager's documentation) or .xinitrc:

udiskie &

This will start udiskie as a background process with default settings (automounting enabled).

Command-line Tools

Udiskie provides four main commands:

  1. udiskie - The main daemon
  2. udiskie-mount - For mounting devices
  3. udiskie-umount - For unmounting devices
  4. udiskie-info - For getting information about devices

Common usage examples:

# Mount all available devices
udiskie-mount -a

# Mount a specific device
udiskie-mount /dev/sdb1

# Unmount a mounted device
udiskie-umount /media/USERNAME/DEVICENAME

# Unmount and power down a USB device
udiskie-umount --detach /media/USERNAME/DEVICENAME

# Unmount all mounted devices
udiskie-umount -a

# List all handleable devices
udiskie-info -a

Configuration

The file '~/.config/udiskie/config.yml' can be used to configure udiskie defaults for command line parameters and customize further settings. The actual path may differ depending on '$XDG_CONFIG_HOME'.

  • If you don't want to install PyYAML, it is possible to use an equivalent JSON file with the name 'config.json' instead.

Here's a very basic configuration example, man udiskie for complete documentation:

program_options:
  tray: true              # Show tray icon
  notify: true           # Enable notifications
  automount: true        # Enable automatic mounting
  file_manager: xdg-open # Program to open mounted directories

device_config:
  # Example: Special options for specific devices
  - id_uuid: "your-device-uuid"
    options: [noexec, nodev]
    ignore: false
    automount: false

notifications:
  timeout: 1.5           # Notification timeout in seconds
  device_mounted: 5      # Show mount notifications for 5 seconds

Common Options

Daemon Mode (udiskie)

  • --no-automount - Disable automatic mounting
  • --no-notify - Disable notifications
  • --tray - Show tray icon
  • --smart-tray - Show tray icon only when actions are available
  • --password-cache MINUTES - Cache LUKS passwords for specified duration

Mount Operations (udiskie-mount)

  • -a, --all - Mount all available devices
  • -r, --recursive - Recursively mount LUKS partitions after unlocking
  • -o OPTIONS - Specify mount options

Unmount Operations (udiskie-umount)

  • -d, --detach - Power down the device after unmounting
  • -e, --eject - Eject media (for optical drives)
  • -f, --force - Force unmount
  • -l, --lock - Lock encrypted devices after unmounting

Additional Notes

  • By default, devices are mounted under /media/USERNAME/ or /run/media/USERNAME/
  • LUKS devices require password input unless password caching is enabled
  • Mount options can be used to restrict execute permissions and device files

See Also

  • man udiskie for complete documentation