
BASH STARTUP TASKS:
Login shell is a shell that started by logging into the system.
Non-Login Shell is started up in some other way, for example by a user or a program issuing the bash command.
Order in which login-shell calls the Script:
- /etc/profile
- /etc/profile.d/*.sh
- ~/.bash_profile ~/.bashrc
- /etc/bashrc
Note:
- Each script can undo (override) changes made in previously called script.
For example, the ~/.bash_profile can override /etc/profile - /etc/bashrc (global) and ~/.bashrc (user level) runs for all shell and used for setting local variables and defining aliases.
- Non-login references some of the same files, but in a different order. Non-login shells first calls ~/.bashrc this calls /etc/bashrc and this calls /etc/profile.d/*.sh

Connect With Us





Instant Query