this is good info about linux bash
Originally posted on Asif's Blog:
I always had confusion about login vs non-login shell and today decided to clear this up. Here is what I have understood. Please refer to the following site for more explanation.
When a user starts The shell program
/bin/bash (hereafter referred to as just “the shell”), shell uses a sequence of startup files to create an environment for the user. This includes PATH, PS1, HOME etc. Each file has a specific use and may affect login and interactive environments differently.
First Some definitions:
A login shell is one whose first character of argument zero is a -, or one started with the –login option. It starts after a successful login using /bin/login and by reading the /etc/passwd file.
An interactive shell is one started without non-option arguments and without the -c option whose standard input and error are both connected to terminals, or…
View original 166 more words