/etc/rc.conf vs /etc/defaults/rc.conf

Scott Mitchell scott+freebsd at fishballoon.org
Mon Jan 12 14:31:25 PST 2004


On Tue, Jan 13, 2004 at 09:18:13AM +1100, August Simonelli wrote:
> Hi all,
> 
> I've looked in the handbook (and probably missed the explanation) but am
> still a little confused. What's the difference between these two rc.conf
> files? Both affect things, but what is best practice for their use?
> 
> Thank in advance,

Hi,

/etc/defaults/rc.conf sets the default values for all of the configuration
options - the values that will be used if you don't change anything.  You
shouldn't ever need to modify this file, or anything else in /etc/defaults
for that matter.

/etc/rc.conf is where you put local changes to the defaults - things that
are specific to your system or network.  At the very least, you will
probably want to set the name of your machine and configure whatever
network interfaces you have in here.  The installer may have already
written some settings to /etc/rc.conf when you were first setting up
FreeBSD on the machine.

So my general rule is to only ever edit /etc/rc.conf, and to just put
changes to the default settings in it.  Some people will copy the whole
/etc/defaults/rc.conf to /etc/rc.conf and then make whatever changes they
require - you get to see everything together in one file this way, but the
danger is that you drift further and further away from the default
configuration as upgrades change things in /etc/defaults/rc.conf, without
you noticing.

Hope that helps,

	Scott

-- 
===========================================================================
Scott Mitchell           | PGP Key ID | "Eagles may soar, but weasels
Cambridge, England       | 0x54B171B9 |  don't get sucked into jet engines"
scott at fishballoon.org | 0xAA775B8B |      -- Anon


More information about the freebsd-questions mailing list