When you insert a flash stick into USB port the following happens:
- The file system of each USB drive partition is detected automatically
- Partitions are mounted automatically to a temporary path like
/media/bob/7B57-DCAAwith proper options - The path is owned by currently logged in user (in GUI)
- The path is deleted automatically after
umount /media/bob/7B57-DCAAcommand execution
Is there a simple command which does the same without having to manually create the path, to detect FS type, to mount the partition, to give proper permissions/ownership and to delete the path after umount?
UPDATE
Currently, I'm using Linux Mint 17 Qiana (Cinnamon) but other distros/window managers are also interesting.
2 Answers
This depends highly on your window manager. For gnome it is pretty easy and doesn't even need root:
# gnome-mount /dev/sdxy
Unfortunately, KDE has no helper/wrapper like gnome and invokes udisks directly, which is the way you wanna do it in KDE (root required):
# sudo udisks --mount /dev/sdxy
EDIT: gnome-mount is of course highly outdated, as it uses HAL. The new way would be to use gvfs:
# gvfs-mount -d /dev/sdxy5
I personally use pmount for this task. You don't have to run it as root either.
sudo apt-get install pmount
pmount /dev/sdX
pumount /dev/sdXJust seems to work.
1