Bash – Can a home directory have both .cshrc and .bashrc files

bashbashrccsh

Or are they both not allowed at the same time?

Best Answer

Not only is it possible, some systems set up new accounts with both. This allows the same skeleton setup to be used whichever shell the user gets.

The purpose of the two file is the same, but they belong to two different shell families. The syntax of the shell scripts for the two shells is very different so different scripts are required.

With a bit of care it is possible to use the same rc file for Bourne shell, ksh, and bash. This can be done by inclusion or hard links.

Related Question