# /usr/local/etc vs /etc vs others etc ?



## zeugme (Feb 14, 2019)

Hi,

Very new to FreeBSD, I'm trying to figure out the differences between other system I had more experience.
By the way, I found the installation really efficient : simple, quick, not bloated and I love the fact it start by addressing drive & partition rather than a last step installation.

Anyway, let's focus on my question :
I'm not sure to figure out the difference between various etc. I read the handbook but I didn't get back the my answer.
Given an installed "software", how do I know I'd better look to /etc for the config rather than in /usr/local/etc.
I can't remember by heart writing this, but I guess there are other etc places (/root/etc ?)
I feel it could be a good way to distinguish "things" but not sure to understand what discriminate those etc folders.

Any pointer to read ?

Any link also from where is the config (which etc) and where the software is physically installed ?

Thanks.

+ usual newbie disclaimers : I searched the /local/usr/etc and /etc but didn't find a thread. May not master the search tool.
Might also be a stupid question, you'll explain and I'll learn, that the goal


----------



## tommiie (Feb 14, 2019)

I believe /etc/ is for the base system while /usr/local/etc/ is for software that you installed yourself using pkg(8). I'm not sure there are other "etc" folders.


----------



## hukadan (Feb 14, 2019)

You will find a lot of valuable information on the file system hierarchy by reading hier(7).


----------



## drhowarddrfine (Feb 14, 2019)

See if 'man hier' answers your questions.


----------



## ralphbsz (Feb 14, 2019)

Your answer is mostly correct, except one thing you write is confusing:



getopt said:


> /usr/local/etc is for the configuration files of the userland ports/packages ...


[/QUOTE]
A lot of stuff that is installed from ports/packages and has its configuration in /usr/local/etc is not "userland", but system utilities.  For example the DHCP server, and BIND (the DNS server).  Neither are programs a user would ever get any joy out of, they are purely system tools.

I think the correct distinction is not system versus user, but base operating system, versus optional installed packages/ports.


----------



## SirDice (Feb 14, 2019)

ralphbsz said:


> A lot of stuff that is installed from ports/packages and has its configuration in /usr/local/etc is not "userland", but system utilities


If we're nitpicking, it's _third party software_, not system utilities. For example I consider dhclient(8) a system utility. 



ralphbsz said:


> For example the DHCP server, and BIND (the DNS server). Neither are programs a user would ever get any joy out of, they are purely system tools.


It doesn't have anything to do with being useful for a user or not. Transmission is useful for a user and its configuration files live in /usr/local/etc.

The difference is easy. All third party software, ports/packages, i.e. everything that's not part of the base OS, is configured via /usr/local/etc.


----------



## zeugme (Feb 15, 2019)

Thanks a lot for your answers. I didn't finished to read all pointers given, but it already clarify things. I'll finish this weekend.


----------



## tommiie (Feb 15, 2019)

So basically... what I said in the first reaction: base system vs. things you install yourself.


----------

