Mailing List Archive
tlug.jp Mailing List tlug archive tlug Mailing List Archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]Re: [tlug] .bashrc not being source correctly
- Date: Fri, 27 Aug 2010 11:46:43 +0900
- From: Jean-Christian Imbeault <jc.imbeault@example.com>
- Subject: Re: [tlug] .bashrc not being source correctly
- References: <AANLkTikOkDdVbMOkHApZN16QJ7=PXP_5KOiEJNbxhro1@example.com> <AANLkTimV_R8BwLgZWn-QwWFDDift37V4OK=NRbHqK7cu@example.com>
Richard, you've nailed it. I didn't know that .bashrc is not used for login shells ... 'su' without the '-' does indeed source everything correctly. Thanks for the great link. I'll read it and try to figure out how to create .bash_profile. Jc On Fri, Aug 27, 2010 at 11:35 AM, Richard Frankum <richard.frankum+mailinglist@example.com> wrote: > >From what I can see from the bash man page, under the INVOCATION > header, .bashrc is not sourced when you run a login shell as you are > doing here. Do you get your aliases if you run su without the '-' > parameter? > > This seems to be a good overview: > http://joshstaiger.org/archives/2005/07/bash_profile_vs.html > > --Richard > > On Fri, Aug 27, 2010 at 10:55 AM, Jean-Christian Imbeault > <jc.imbeault@example.com> wrote: >> When I su to a different user I've noticed that my .bashrc doesn't >> seem to be sourced since the .bashrc_aliases isn't being used. >> >> Specifically: >> >> jci@example.com:~$ su - www-data >> www-data@example.com:~$ ls -a .bash* >> .bash_aliases .bash_history .bashrc >> www-data@example.com:~$ cat .bash_aliases >> alias ll="ls -l" >> www-data@example.com:~$ ll >> ll: command not found >> >> My .bashrc contains the following near the end of the file: >> >> if [ -f ~/.bash_aliases ]; then >> . ~/.bash_aliases >> fi >> >> I know there is nothing wrong with the .bashrc since I can source it >> and then my alias works. So I'm guessing the .bashrc is not getting >> sourced at all when I do 'su - www-data'? >> >> Thanks! > > > -- > --Richard Frankum > > -- > To unsubscribe from this mailing list, > please see the instructions at http://lists.tlug.jp/list.html > > The TLUG mailing list is hosted by the award-winning Internet provider > ASAHI Net. > Visit ASAHI Net's English-language Web page: http://asahi-net.jp/en/ >
- Follow-Ups:
- Re: [tlug] .bashrc not being source correctly
- From: Bruno Raoult
- References:
- [tlug] .bashrc not being source correctly
- From: Jean-Christian Imbeault
- Re: [tlug] .bashrc not being source correctly
- From: Richard Frankum
Home | Main Index | Thread Index
- Prev by Date: Re: [tlug] .bashrc not being source correctly
- Next by Date: Re: [tlug] .bashrc not being source correctly
- Previous by thread: Re: [tlug] .bashrc not being source correctly
- Next by thread: Re: [tlug] .bashrc not being source correctly
- Index(es):
Home Page Mailing List Linux and Japan TLUG Members Links