[plug] login problem

Craig Dyke grail at enterprize.net.au
Fri Aug 9 00:56:40 WST 2002


I knew after i sent the mail that i would catch myself out<bugger>

.bashrc is symbolic link to .bash_profile

???
----- Original Message -----
From: "Matt Kemner" <zombie at penguincare.com.au>
To: "plug" <plug at plug.linux.org.au>
Sent: Friday, August 09, 2002 12:43 AM
Subject: Re: [plug] login problem


> On Fri, 9 Aug 2002, quoth Craig Dyke:
>
> > In .bashrc i have a line which reads:
> >
> >     test -f .alias && source .alias
> >
> > My problem is that if i login at a console my .alias file is never
> > sourced.
>
> .bashrc is only read by non-login shells, .bash_profile is only read y
> login shells.  A login shell is the shell you log in to (ie the very first
> shell that runs after you log in)
>
> My solution is to put all my aliases/variables in .bashrc and source
> .bashrc from .bash_profile
>
> > Also, if i su in to this user from root the aliases don't work, but
> > if i su - user then they do???
>
> The - tells su to run the user's shell as a login shell.
>
>  - Matt
>




More information about the plug mailing list