How to automatically mount usb flash drive at startup
Edit your fstab
via
sudo nano /etc/fstab
and add the line below
UUID=0e281f8d-1117-451d-9b1b-b07405a631bc /media auto nosuid,nodev,nofail 0 0
Replace the UUID in my example above with the UUID of your partition
sudo blkid /dev/sdb2 | awk -F'"' '{print $2}'
Note, the entry in your fstab
doesn't mount the drive if it's not present during startup.
You can use Ubuntu Disks
utility. Open the Dash and search for Disks
.
Select your USB key in the menu on the left, click the gears and select Edit Mount options :
From here simply check : Mount at startup :