Automount in 16.04
I need automount for internal and external storages. On boot and on connect. For now I have to click in file manager to make it accessible which is weird for 2016! I know that only udev can be involved in it. But cant find a way for modern ubuntu, all tutorials bit out of date(used HAL and so on). I don't want use fstab also. P.S. This should work without any 'heads' like KDE, Unity, Gnome. Just from runlevel 3 and so on. Minimum requirements. (no automount daemon).
You can do this in the Disks
application, it is preinstalled, search in the dash and open it.
Now click the partition on the left and under the diagram in the center click the little cog icon
Now choose edit mount options
and make the settings, Automatic mount > off
, Mount at startup > on
, Show in interface > on
and Require additional authorization to mount > off
.
This will mount the partition as your user at boot and show it in the launcher, you can also change the name and stuff here too.
As requested by OP here is a way to do this via terminal
First we need the UUID of the disk to be mounted, find it with
blkid /dev/sdX
Replace the X with the correct ID of course, the UUID looks like this
40e554eb-6421-4813-88ea-3882a3a7a153
Now open this file
sudo nano /etc/fstab
Now add this line to the end
UUID=40e554eb-6421-4813-88ea-3882a3a7a153 /mnt/Disk auto nosuid,nodev,nofail,x-gvfs-show 0 0
Change the UUID for yours and /mnt/Disk should be changed to where you want to mount the disk and save the file.