Do "personal fstab" files exist for user accounts?

I'm looking for a "personal" equivalent for the /etc/fstab file, that apply only on my account (on login); does such a file exists? Or is it more complicated?


In case we need to always mount a drive after we log in to our account but do not want this drive mounted at boot we may want to consider mounting by udisks. Below command will e.g. mount the drive ``/dev/sdc1to/media/` (no root permissions needed):

udisks --mount /dev/sdc1

This command can be added to a script, or put in autostart applications if needed.

See also these related questions here:

  • Automatically mount NTFS drive when I login
  • CLI mounting vs. GUI mounting
  • How to configure the default automount location?

No you can not. But it is not too complicated to do: all you need to do is create a script that manually adds the mount points you need and execute that script from your login.

Lets assume this is the fstab entry for a personal mount that you want only mounted if you login:

# volume              mount point       type  options
news:/usr/spool/news  /usr/spool/news   nfs   timeo=14,intr

the manual mount could be:

mount news:/usr/spool/news

So if you put this in a script (cd ~ && gedit mount_them.sh) and make the script executable you can add this script to your .bash_profile or .bashrc (.bash_profile is executed for login shells, while .bashrc is executed for interactive non-login shells). Adding something like this (pseudo code) would mount them for you:

if [ -f ~/mount_them.sh ]; then
   ./mount_them.sh
fi

A similar command to Takkat's is the following:

udisksctl mount -b /dev/sdc1

this will mount the device /dev/sdc1 to the following location (just like Nautilus would do it)

/media/$USER/$DEVICE

where $USER is your username and $DEVICE is the device label if it is set, otherwise it is the device UUID.

Note: The manpage for this command exists only in 12.10+, so I'm assuming this is only available for 12.10+.