From: Jan Nicolai Langfeldt (janl@ifi.uio.no)
Date: 07/27/92


From: janl@ifi.uio.no (Jan Nicolai Langfeldt)
Subject: .login, .profile bash and stuff (some answers) (Was: Minor problems with Linux)
Date: 27 Jul 1992 17:29:18 GMT


This is actuall pieces of the bash man page:

Nicolai

-- 
Nicolai Langfeldt, "Bugs made while you wait"             
Internet: janl@ifi.uio.no

==================== INVOCATION A login shell is one whose first character of argument zero is a - , or one started with the -login flag.

An interactive shell is one whose standard input and output are both connected to terminals (as determined by isatty(3)), or one started with the -i flag. PS1 is set and $- includes i if bash is interactive, allowing a way to test this state from a shell script or a startup file.

Login shells: On login: if /etc/profile exists, source it.

if ~/.bash_profile exists, source it, else if ~/.bash_login exists, source it, else if ~/.profile exists, source it. On logout: if ~/.bash_logout exists, source it.

Non-login interactive shells: On startup: if ~/.bashrc exists, source it.

Non-interactive shells: On startup: if the environment variable ENV is non-null, expand it and source the file it names.

FILES /bin/bash The bash executable /etc/profile The systemwide initialization file, executed for login shells ~/.bash_profile The personal initialization file, executed for login shells ~/.bashrc The individual per-interactive-shell startup file ~/.inputrc Individual Readline initialization file