19 ms·
My rule of thumb: shell-independent commands go to .profile, those ran at boot time go to .bash_profile (or shell-appropriate) which then sources .profile, thos
by goblin89 6y ago
My rule of thumb: shell-independent commands go to .profile, those ran at boot time go to .bash_profile (or shell-appropriate) which then sources .profile, those ran each time you open a new shell go to .bashrc (or shell-appropriate).
- AareyBaba 6y agoOSX is an exception. OSX runs a login shell for each new terminal window and executes .bash_profile. # http://www.joshstaiger.org/archives/2005/07/bash_profile_vs.html http://www.joshstaiger.org/archives/2005/07/bash_profile_vs....
- boring_twenties 6y agoYou can do that in most (all?) Unix terminal emulators. It's the -ls option to xterm and rxvt, or a checkbox in {gnome,mate}-terminal.
- rurban 6y agoNope. Shell specifics go into the name or extension. like .bash_profile over .profile. or /etc/.../bla{.csh,.bash,.sh} .profile is only for login sessions, .shrc is sourced on every shell fork, about 1000x more than .profile.