- .bash_profile, .profile are used for interactive login mode
- .profile is not limited to bash
- bash will search .bash_profile, then .profile
- .bashrc is used for interactive non-login mode
- non-login: e.g., after login, we open new terminal window
- In MacOS, terminal is usually in interactive login mode
- How to load the dotprofile.template without repeat:
We can put them into our .bash_profile or .bashrc
if [ -f $DOTPROFILE ] then source $DOTPROFILE fi
- If planning to keep .bash_profile and .bashrc with the same enviroments, we can let write the codes above in .bash_profile, and source .bash_profile in .bashrc or vice versa.
dotfiles
Folders and files
Name | Name | Last commit date | ||
---|---|---|---|---|
parent directory.. | ||||