Introducing the Linux Command 'autofs'

Control the automount daemons with this versatile script

The autofs script controls the operation of the automount daemons running on the Linux system. Usually, autofs is invoked at system boot time with the start parameter and at shutdown time with the stop parameter. The autofs script can also manually be invoked by the system administrator to shut down, restart or reload the automounters.

Tux the penguin is the official Linux mascot.
Getty Images/John Coulter


Autofs consults the configuration file /etc/auto.master to find mount points on the system. For each of those mount points a automount process starts with the appropriate parameters. Check the active mount points for the automounter with the/etc/init.d/autofs status command. After the auto.master configuration file is processed the autofs script checks for an NIS map with the same name.

If such a map exists then that map will be processed in the same way as the auto.master map. The NIS map will be processed last and /etc/init.d/autofs reload checks the current auto.master map against running daemons. It will kill those daemons whose entries have changed and then start daemons for new or changed entries. If a map is modified then the change will become effective immediately. If the auto.master map is modified then the autofs script must be rerun to activate the changes.

Running /etc/init.d/autofs status displays the current configuration and a list of currently running automount daemons.

Was this page helpful?