.profile vs .bash_profile and .bash_login
suggest change.profile is read by most shells on startup, including Bash. .bash_profile is used for configuration specific to Bash. For general initialization code, put it in .profile. If it’s specific to Bash, use .bash_profile.
.profile is not designed for Bash specifically; .bash_profile is. (.profile is for the Bourne shell and other similar shells, which Bash is based on.) Bash falls back to .profile if .bash_profile is not found.
.bash_login is a fallback for .bash_profile if that file is not found. It is generally best to use .bash_profile or .profile instead.
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents