When we log on to the system, the
bash program starts and reads a series of configuration scripts called startup files, which define the default environment shared by all users. This is followed by more startup files in our home directory that define our personal environment. The exact sequence depends on the type of shell session being started.
There are two kinds of shell sessions: a login shell session and a non-login shell session.
A login shell session is one in which we are prompted for our username and password; for example, when we start a virtual console session. A non-login shell session typically occurs when we launch a terminal session in the GUI.
Login shells read one or more ...