HowTo: Remount /etc/fstab Without Reboot in Linux

The configuration file /etc/fstab contains the necessary information to automate the process of mounting partitions.

You would normally have to reboot your Linux system, after editing this file.

There is a simple way which will remount all the partitions from your /etc/fstab file without restarting the system.

Run the following command as root:

# mount -a

This simple command causes all filesystems mentioned in /etc/fstab to be remounted, except the partitions with noauto option.

10 Replies to “HowTo: Remount /etc/fstab Without Reboot in Linux”

  1. I was hoping this was possible, thank you!

  2. So if I change what is mounted on /mnt/myshare , and execute mount -a, it will unmount was there, and mount what I changed it to?

    it //server/share1 /mnt/share
    I change it to //server/share2 /mnt/share
    then execute mount -a
    //server/share2 will be mounted on /mnt/share ?

  3. mount: /mnt/$PATH_I_CHOSE: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program.

    I think this method needs some updating…

    1. which method? “mount -a”? It works flawlessly for me in Debian 10.5 and LMDE 4, so Im not sure if it really needs an update.

      In the past, I have gotten the “mount: /mnt/$PATH_I_CHOSE: bad option; for several filesystems (e.g. nfs, cifs) you might need a /sbin/mount. helper program.” error, mainly when I tried to mount an nfs share with no ‘nfs-common’ installed on my client computer.

    2. Doesn’t seem to be working for me on Gentoo. I have a tmpfs mounted @ /var/tmp/portage and wanted to change the size. It doesn’t seem to be happening after running mount -a

      1. mount -o remount /tmp

  4. You are a saint! This is also really useful if you have an NFS mount that timed out at boot, so it did not mount, but is now available.


  5. Excelente, muy secillo y bastente util, Gracias!!

  6. thanks a lot. found it very useful and it saved me lots of time!!.

  7. Hi, is it possible to define an env var in /etc/profile, such as:
    export RAMDISK=/home/pi/myvirtualdisk

    and have that var be included in fstab as follows?
    tmpfs $RAMDISK tmpfs nodev,nosuid,size=1500M 0 0

    In this way I can easily change location of my ram disk. Thanks!

Leave a Reply