Re: login, path and ~/.profile
From: Jan T. Kim (jtk_at_cmp.uea.ac.uk)
Date: 09/30/05
- Previous message: Jan T. Kim: "Re: login, path and ~/.profile"
- In reply to: Jan T. Kim: "Re: login, path and ~/.profile"
- Next in thread: Jon Dowland: "Re: login, path and ~/.profile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 30 Sep 2005 11:08:34 +0100 To: Debian Linux Distro Users Discussion <debian-user@lists.debian.org>
On Fri, Sep 30, 2005 at 11:02:23AM +0100, Jan T. Kim wrote:
> On Fri, Sep 30, 2005 at 08:50:05AM +0200, Benedict Verheyen wrote:
> > Hi,
> >
> > i was looking to change the prompt of a UML and while i was at it i
> > noticed something in regards to the path that is set.
> > When logging in these files are processed (used echo to find out)
> > /etc/profile
> > /etc/bash.bashrc
> > ~/.bash_profile
> > ~/.bashrc
> >
> > This might differ on your system as I:
> > * source /etc/bash.bashrc from /etc/profile
> > * source ~/.bashrc from ~/.bash_profile
> >
> > When doing su, these files are executed
> > /etc/bash.bashrc
> > ~/.bashrc
> >
> > As for my questions:
> > 1. Why isn't ~/.profile run?
>
> The su command does not launch a login shell, and the login scripts
> (/etc/profile and ~/.profile) are only executed by a login shell. That's
> the difference between the two.
Sorry, that was not clear: What I mean is that the difference between
login scripts (/etc/profile and ~/.profile) and startup scripts
(/etc/bashrc and ~/.bashrc) is that login scripts are only executed
by login shells, but not by other shells, whereas the startup scripts
are executed by each shell process upon being launched (unless this
is suppressed).
The difference between /etc/profile and ~/.profile is that the former
is the system-wide login script and the latter is the account-specific
(personal) one, of course.
Best regards, Jan
-- +- Jan T. Kim -------------------------------------------------------+ | *NEW* email: jtk@cmp.uea.ac.uk | | *NEW* WWW: http://www.cmp.uea.ac.uk/people/jtk | *-----=< hierarchical systems are for files, not for humans >=-----* -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: Jan T. Kim: "Re: login, path and ~/.profile"
- In reply to: Jan T. Kim: "Re: login, path and ~/.profile"
- Next in thread: Jon Dowland: "Re: login, path and ~/.profile"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|