I want to know if there is any guidance I should be following somewhere (maybe from a man page or something) regarding creation of a ~/.bash_profile
. By default Ubuntu 18.04 doesn't have one, it just has a .profile
file. As I understand it, .profile
should just be executing ~/.bashrc
. Thus my assumption is that I just need to add a line at the end of my ~.bash_profile
to execute ~/.bashrc
; something like:
[[ -f ~/.bashrc ]] && . ~/.bashrc
The reason I ask is because if I create this file, then my .profile file will not be called, so I just need to make sure I'm doing it right.
Second part of my question is, am I correct in understanding ~/.bash_profile
should only be invoked ONCE during my login, and then that's it (i.e. sub-sequent interactive shells will just invoke only /etc/bash.bashrc
followed by ~/.bashrc
?