Centos Reload Fstab

In this post, we will show you a simple way to reload fstab in CentOS without rebooting the system.

Let’s start with a brief introduction to fstab. You can mount file systems manually or automatically on the Linux operating system. A filesystem is linked to a system’s directory tree in the mounting process, such as a USB drive mounted under the /mnt or /media directory. This way, the USB drive becomes part of the directory tree. Whereas in unmount process, a filesystem is unlinked from the directory tree. In Linux, the fstab (known as OS’s filesystem table) is a configuration file that contains information about the filesystems on a system. The fstab file is located inside the /etc directory. The /etc/fstab contains all of the information needed to automate the mounting of partitions.

When you add a new entry in the /etc/fstab file, it will not auto-mount it. You are normally required to reload the entries by restarting your system, which is not convenient.

Let’s show you an alternative and quick way to reload new entries in fstab without restarting your system. After doing the configurations in the fstab file, save and exit the editor.

Then run the command below to reload fstab entries.

$ mount -a

If the command runs successfully, you will not see any output.

With the exception of those lines which contain the noauto keyword, this command allows all filesystems stated in fstab to be mounted as specified. The noauto keyword prevents auto-mounting of a device at system boot.

You can also view the verbose output using the -v option:

$ mount -a -v

This Linux article shared how to reload fstab in CentOS without rebooting the system. I hope this helps!

About the author

Karim Buzdar

Karim Buzdar holds a degree in telecommunication engineering and holds several sysadmin certifications. As an IT engineer and technical author, he writes for various web sites. He blogs at LinuxWays.