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:

  1. /etc/profile        
  2. /etc/profile.d/*.sh        
  3. ~/.bash_profile   ~/.bashrc            
  4. /etc/bashrc


Note:   

  1. Each script can undo (override) changes made in previously called script.
    For example, the ~/.bash_profile can override /etc/profile
  2. /etc/bashrc  (global) and ~/.bashrc (user level) runs for all shell and used for setting local variables and defining aliases.
  3. 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
Your Name :
Email Address :
Message :