Quote:
Originally Posted by exvor
I have always wondered why the folowing is in /etc/profile.d/dircolors.sh and in /etc/bashrc
Code:
alias ls='ls --color=auto'
I figured I would leave it out of the dircolors file and just add it to the bashrc but when I do that I do not get a colored output for ls. I thought any alias you setup in /etc/bashrc is effective for anyone on the system. Or is that just for non interactive shells?
|
More than you ever wanted to know about bash startup files is
here. Chances are /etc/profile sources all the /etc/profile.d/*.sh files. The bash documentation linked above does not mention /etc/bashrc, only ~/.bashrc so you will have to inspect /etc/profile and any ~/.bashrc to see where /etc/bashrc is sourced from.
A common technique to give similar setup for interactive shells, regardless of whether they are login shells or not, is to add this line to /etc/profile
Code:
if [ -f ~/.bashrc ]; then . ~/.bashrc; fi