How to properly automount a drive in Ubuntu Linux

I've stolen this from TechRepublic , and am reproducing it here so I can find this info again when I need to. The original article is: How to properly automo...

I’ve stolen this from TechRepublic, and am reproducing it here so I can find this info again when I need to.

The original article is: How to properly automount a drive in Ubuntu Linux.

The bit that I need to remember is:

Show attached drives:

sudo fdisk -l

Then, get the UUID. Some drives don’t have a long GUID-style UUID.

blkid

Then, create a mount point and edit /etc/fstab

Add an entry to the bottom of fstab like so:

UUID=1234-ABCD /media/sandisk auto user,umask=000,nosuid,nodev,nofail 0 0

Save and quit. Then use mount -a to test it’s working.

Keep This Useful

Spotted something outdated or unclear?

If a step has changed, a screenshot no longer matches, or something here just does not work the way it should, get in touch and we will take a look.