Configuration files and directories

This page tabulates some common locations of configuration file in Linux. Different distributions store their config in different locations with different filenames. I've made no effort to specify the distribution (these example are from Mandrake 8/9, Redhat 7/8/9, SuSE 10) because it is intended simply as a search aid - if you can't find a config file in the location you'd expect, perhaps try one of these.

You can run slocate filename or find / -name "filename" (add the -mount switch to prevent searching on mounted partitions) to locate them.

FilenameDescription
/etc/modules.confHolds kernel module configuration.
/etc/rc.d/rc.sysinitRan once at boot time (the output of which you see as linux loads). Put low level configuration here (e.g. Configure DMA).
/etc/rc.d/init.dDirectory containing scripts for various services. They can be controlled with the command service service_name start|stop|restart, or directly with /etc/rc.d/init.d/service_name start|stop|restart. There are hard (?) links in the /etc/rc.d/rc.0 ... rc.9 directory that control which of these services are started at the various runlevels. To prevent a service starting you can either delete the script, rename the script, remove the link from the runlevel-specific directory or remove the execute permission from the script.
/etc/rc.d/rc.0 ... rc.9Control the services that are started at the various runlevels. The directories contain links to scripts held in /etc/rc.d/init.d
/etc/rc.d/rc.localExecuted after the other configuration scripts. Put most of your system-wide high level configuration here (e.g. Turn on DPMS).
/etc/inittabDefines how the system is set up at the various run-levels. You can change the default run-level here by altering the line id:runlevel:initdefault: for the runlevel of you choice (e.g. id:3:initdefault to boot into the command prompt and id:5:initdefault to boot into X11).
/etc/profileMainly defines the environment variables. (e.g. add to the path with PATH=$PATH:location).
/etc/fstabThis defines the various mount points and their parameters. (See this introduction to mount and fstab and fstab and octal umasks for a more complete description of the umask parameter).
/etc/servicesDefines network services and their ports.
/etc/sysconfig/i18nThis defines the locales.
/etc/sysconfig/network-scriptsContains network configuration scripts. Note that Redhat's GUI network tools will store their config in /etc/sysconfig/networking and overwrite the config in network-scripts. So don't use them. You have been warned.
/etc/sysconfig/networkContains network configuration scripts (SuSE 10).
/etc/xinetd.dContains the services controlled by xinetd.
/etc/xinetd.confxinetd configuration.

Last modified: 13/06/2006 (most likely earlier as a site migration in 2006 reset some dates) Tags: (none)

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top