UNIX-WIZARDS Digest V11#025

Arthur W. Protin Jr. protin at pica.army.mil
Thu Nov 8 09:25:40 AEST 1990


in UNIX-WIZARDS Digest  V11#025 <9011070545.aa07038 at SEM.BRL.MIL>
ihor.j.kinal <ijk at cbnewsh.att.com> writes:
> QUESTION: is /etc/profile really executed upon login under the ksh,
> 	assuming the user has ksh  as the login shell??  If I want
> 	to define a GLOBAL alias for everyone can I do it in /etc/profile?
> 	[To answer my own question, is I don't think so].
ANSWER: That is exactly what the man page for ksh says!
"If the shell is invoked by \fIexec\fR(2), and the first
character of the argument zero (\fB$0\fR) is -, then the
shell is assumed to be a \fIlogin\fR shell and commands are read
from \fB/etc/profile\fR and then from either \fB.profile\fR in
the current directory or \fB$HOME/.profile\fR, if either file exists."

And that is exactly what it does on properly functioning systems!

WHEN IN DOUBT: Read the Fine Manual.
WHEN YOU SPOUT: Quote the Fine Manual.


Arthur Protin <protin at pica.army.mil>
These are my personal views and do not reflect those of my boss
or this installation.



More information about the Comp.unix.internals mailing list