Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm starting to use command line a little more, and I see there are a lot of ways to configure some config files in my $HOME. This is good, since you can customize it the way you really like.

Unfortunately, for begginners, having too many options is a little confusing. For example, I created .bash_alias for some alias I'm using. I didn't even know this option existed, I'm used to simply edit .bashrc.

Do exist a pattern, a "good practice", envisioning flexibility and modularity in terms of rc files structure? Do exist a standardization group for this, or every body just creates it's own configuration setup?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

the configuration files are all dependent upon the software that uses them. in most cases, the file is named .<programname>rc in some cases it's a config file in a 'hidden' . directory, i.e. ~/.fluxbox/init

there is nothing wrong with putting your aliases in the .bashrc file, .bash_alias is another shell script called from within .bashrc, some people just like to segregate their configurations while others, like me, prefer putting all our related configurations in the same file, for easy management.

in my .bashrc there is:

#if [ -f ~/.bash_aliases ]; then
#    . ~/.bash_aliases
#fi

which is what i presume is in yours, only not commented out, meaning it checks that .bash_alias is a file, and then 'sources' it into the .bashrc file (that's what . ~/.bash_alias means, . in this case is a shortcut for source)

share|improve this answer

Your Answer

 
discard

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.