shell configuration files?

Since I exclusively use bash, I never really bothered about shell configuration files: I have .bash_profile with PATH,MANPATH, and some Python related settings, and then .bashrc with other variables, settings, functions, and aliases (which was also sourced from .bash_profile).

Now, I decided to clear all these things up a bit, and this is how I see the situation:

  • .profile: settings that should be available for any shell (i.e., PATH,MANPATH and other shell variables, from PYTHONPATH to LSCOLORS, from EDITOR to HISTSIZE (the latter isn't bash-specific, am I right?)
  • .bash_profile: any bash-specific settings: functions, aliases, etc.
  • .bashrc: theoretically there should go settings for a non-login shell (if I'm already logged into the machine and start a new bash instance). However, since on macOS .bashrc is always executed, with every new terminal tab or window, I can probably just skip this one?

Posted Jun 4, 2019, 3:14 PM UTC

25
Loading comments…