Ubuntu: Mount USB to the same directory Ubuntu



Question:

I have a USB key which is mounted to a directory that I have created. For this I have edited fstab file in Ubuntu The problem is that if I disconnect this key(which was in /dev/sdb) and connect another USB key, this one is not mounted at the same point.(because it is in /dev/sdb2) How can I make that only on, once a connected USB key is mounted at the same directory?


Solution:1

Ubuntu uses /media as default place for automount, so you can just use a hack for your problem.

sudo ln -s /media /path-to-your-dir  

Now whatever the usb is mounted then it will be listed in some dir inside your dir stated above.

This is some hack, maybe you can find better answer.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »