DEV Community

loading...

Remount /etc/fstab without rebooting

André
Originally published at andreligne.io on ・1 min read

Ever worked on a thing where you need to mount a network share on boot for a Linux machine and find yourself rebooting it over and over to try new configs and see if it works?

I just did that for 20 minutes, and it turns out there’s a command for this.

mount -a
Enter fullscreen mode Exit fullscreen mode

That’s it.

Here’s an excerpt from the man page:

-a, --all
       Mount all filesystems (of the given types) mentioned in fstab (except for those whose line contains the noauto keyword). The filesystems are mounted following
       their order in fstab.
Enter fullscreen mode Exit fullscreen mode

You’re welcome!

Discussion (0)