Register now or log in to join your professional community.
from
http://www.gnu.org/software/bash/manual/html_node/Bash-Startup-Files.html
"When Bash is invoked as an interactive login shell, or as a non-interactive shell with the --login option, it first reads and executes commands from the file /etc/profile, if that file exists. After reading that file, it looks for~/.bash_profile, ~/.bash_login, and ~/.profile, in that order, and reads and executes commands from the first one that exists and is readable. The --noprofile option may be used when the shell is started to inhibit this behavior."
The login will get executed1 time at login, profiles gets executed with every shell/script that you run.
the login is read last to give you the chance to override the profile one knee only one time at login.
To check permissions and environment variables.
the .profile gets executed first and then the .bash_login.
As linux is highly flexible, users are given an opportunity to change the name and location of envioronment setting files (even have a same file for multiple users), but as bash needs a pointer to start with, that pointer is hardcoded to be .profile
Because all enviromanetal varible updates along with reboot and stores in .profile file.
When the bash script executed in specific log in shell then it runs required profile commands which exists
because .profile extension is used for files in terminal programs, profile file in Linux comes under the System startup files(defines user environment after reading the initialization files that you have set up when you log in to shell).
Do you need help in adding the right keywords to your CV? Let our CV writing experts help you.