Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I recently found this home networking tutorial surprisingly enlightening. However, there is one thing I don't understand:

Disabling NFS Start On Boot: If you are not planning on regularly accessing files via NFS, you should not leave the NFS server running and vulnerable to outside attacks. The startup scripts for NFS are in the /etc/rc* directories and you should rename them with the K prefix instead of the S prefix so they do not start at boot time:

the tutorial then gives the following command:

sudo rename s/S/K/ /etc/rc*/*nfs*

I have never really understood the way /etc/rc*/ works. But I assume there are certain directories in which the service servicename start scripts are always run, right? That's just a guess.

So, in this case, why does renaming these have an effect? How does the naming of directories affect this particular instance? What does that rename command actually do? Why does the new directory name ensure that NFS is not started at boot time?

share|improve this question
that rename command also moves S01mountkernfs.sh -- in case anyone reading this uses it. bad idea for newer kernels. – ixtmixilix Mar 7 '12 at 13:00
up vote 2 down vote accepted

Scripts in the /etc/rc?.d directories that start with S are used to start services. Scripts that start with K are used to stop (kill) services. By renaming all the NFS related init scripts starting with S to start with K, you insure that NFS services are never started by default.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.