Complete.Org: Mailing Lists: Archives: discussion: February 1999:
[aclug-L] shell login procedure
Home

[aclug-L] shell login procedure

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: aclug-L@xxxxxxxxxxxx
Subject: [aclug-L] shell login procedure
From: Jeff <schaller@xxxxxxxxxxx>
Date: Wed, 17 Feb 1999 10:11:31 -0600 (CST)
Reply-to: aclug-L@xxxxxxxxxxxx

Sorry I missed the meeting; I fell asleep early ;)
Attached is what I came up with for describing the files that tcsh and
bash read when they start up.

--
Jeff Schaller                 | Voice: (316) 946-7255
UNIX System Administrator     | Fax:   (316) 946-2809
I do not speak for the Bombardier Aerospace Group.
From schaller@xxxxxxxxxxxxx Fri Feb 12 13:40:32 1999
Date: Fri, 12 Feb 1999 13:39:13 -0600 (CST)
From: Jeff Schaller <schaller@xxxxxxxxxxxxx>
To: schaller@xxxxxxxxxxx
Subject: login

A login shell is typically the initial shell. You can get another one by:
bash: 'bash - ' or 'bash --login'
tcsh: 'tcsh - ' or 'tcsh -l' (only argument)
Otherwise, typing "tcsh" or "bash" gets you a non-login shell.

The files listed below are sourced in that order, assuming they exist.
The files listed may source other files, subject to sysadmin
customizations.

======
tcsh
======
        login shell:
--------------------
1) /etc/csh.cshrc
2) /etc/csh.login
3) Does ~/.tcshrc exist?
   Yes: ~/.tcshrc
   No:  ~/.cshrc
4) ~/.history (or value of $histfile)
5) ~/.login
6) ~/.cshdirs (or value of $dirsfile)

(2) may come before (1) and
(5) may come before (3), depending on how tcsh was compiled.

        non-login shell:
------------------------
1) /etc/csh.cshrc
2) Does ~/.tcshrc exist?
   Yes: ~/.tcshrc
   No:  ~/.cshrc

Helpful hints from manpage:
For programs to be run once per login:
  ~/.login

For programs to be run whether you use csh or tcsh:
  ~/.cshrc; inside, check for $tcsh
or
  ~/.tcshrc which does tcsh stuff and sources ~/.cshrc

        logout:
---------------
1) /etc/csh.logout
2) ~/.logout


======
bash
======
        login shell:
--------------------
1) /etc/profile (unless you specify -noprofile)
2) Does ~/.bash_profile exist?
   Yes: ~/.bash_profile
   No: Does ~/.bash_login exist?
        Yes: ~/.bash_login
        No: ~/.profile

        non-login interactive shell:
------------------------------------
1) ~/.bashrc (unless -norc or -rcfile file)

        non-login non-interactive shell:
------------------------------------
1) If started in POSIX mode (-posix), expand $BASH_ENV, otherwise
   if $ENV is set, expand it and source that.

        logout:
1) ~/.bash_logout

=====================
bash, invoked as 'sh'
=====================
        login shell:
1) /etc/profile
2) ~/.profile   (subject to -noprofile)

[Prev in Thread] Current Thread [Next in Thread]
  • [aclug-L] shell login procedure, Jeff <=