Announcement

Collapse
No announcement yet.

Auto mount USB device from command line?

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Auto mount USB device from command line?

    If I burn Raspbian (the Raspberry Pi distro) into an SD card, then as soon as the burn is complete, KDE's device notifier pops up the device volume-names for mounting. These are "boot" and "rootfs". I want to mount "rootfs" from the command line without sudo and without putting anything into fstab. There is evidently a KDE mechanism for doing this because if I click on the pop-up, the device will be mounted as user-readable under /media/<username>/rootfs. I'd like to do this as part of a script, though, so can the same mechanism be invoked from the user command line to mount a specific USB volume-name?
    Last edited by Dave Rove; Oct 08, 2018, 04:09 AM.

    #2
    I think you're looking for "udisksctl". I can't remember the usage, but the man page is good.

    Regards, John Little
    Last edited by jlittle; Oct 08, 2018, 01:28 PM. Reason: typo
    Regards, John Little

    Comment


      #3
      See:

      udisksctl - The udisks command line tool
      Windows no longer obstructs my view.
      Using Kubuntu Linux since March 23, 2007.
      "It is a capital mistake to theorize before one has data." - Sherlock Holmes

      Comment


        #4
        Thanks all.

        udisksctl does indeed do the job. After running "find" in the dev directory, I figured out that the command that I needed was:

        udisksctl mount -b /dev/disk/by-label/rootfs

        Comment

        Working...
        X