0

I mount a device with this commands:

sudo mkdir /media/(device uuid)

sudo mount (device path) /media/(device uuid)

Then when it comes to unmount it:

sudo umount (device path)

sudo rmdir /media/(device uuid)

The problem is that when I do this, the icon remains the launcher, but if I mounted and unmounted the same device using the mouse (not using the command line) there will be no problem.

How can I get the same result than doing it graphically but using the command line?

1 Answer 1

1

This is because auto mounting of disks does not use mount and umount, it is more complex and uses udevadm and udisks.

To detach

sudo udisks --detach /dev/sdb

For additional information on this moderately complex Subject, see

http://manpages.ubuntu.com/manpages/trusty/man7/udisks.7.html

https://help.ubuntu.com/community/Mount/USB#Automounting

and

https://help.ubuntu.com/community/UsbDriveDoSomethingHowto

And also this discussion:

https://unix.stackexchange.com/questions/7051/how-to-re-mount-a-usb-stick-after-unmounting-from-nautilus-without-disconnecting

0

You must log in to answer this question.