BASHRC - Bash Non-Interactive Login Shell File

What is a BASHRC file

BASHRC files are so-called shell files. They are used by the terminal applications available for Mac OS X and Linux. As the long name suggests, the BASHRC files are non-interactive. They are used by the shell terminal automatically once a user creates a new login shell. The terminal then reads the information and instructions in the file. The information contained in the BASHRC file includes (default) scripts that need to be run as well as declarations, variables and setup instructions. Oftentimes, these files are used to set preferences of user command prompts or common paths to directories or executable programs.

In most instances, BASHRC files are used to execute the same scripts or initialize the same settings when creating a new terminal. That way, certain settings do not have to be applied manually but are present for the user from the start. Usually, you can not stumble upon BACHRC files on your Mac because the files are hidden. They are typically saved without a filename though, only containing the file extension: “.bashrc”. In contrast to the BASHRC file that is used for non-interactive login, interactive login shells use the BASH_PROFILE file.

Here's a small, but not exhaustive list of programs that can open BASHRC documents:

  • Apple Terminal (Mac)
  • GNU Bash (Mac & Linux)
  • MacroMates TextMate (Mac)
About
Extension BASHRC
Useful links