-   General (
-   -   What is the global counterpart of ~/.bashrc? (

stf92 12-31-2012 05:19 AM

What is the global counterpart of ~/.bashrc?

~/.bashrc gets things done for a user. Is there a bashrc (or some other name) in /etc that does the same as ~/.bashrc but globally?

EDIT: I think it is /etc/profile.

kabamaru 12-31-2012 06:37 AM


stf92 12-31-2012 06:40 AM

Thanks. However in bash's man page, under FILES, it does not mention it.

kabamaru 12-31-2012 07:29 AM

Yes, that's because it's not built into Bash. It's just a convention that is widely used; some distros put an /etc/bashrc file for system-wide settings, and they source it from ~/.bashrc with:


if [ -f /etc/bashrc ]; then
  . /etc/bashrc

stf92 12-31-2012 01:37 PM

Thank you very much.

All times are GMT -5. The time now is 03:04 AM.