Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
On 2/2/06, Alvin Oga <aoga@mail.linux-consulting.com> wrote:
>
> - if you're confused .. do NOT change files in anything other
> than your own home directory "/home/you"
>
> once you get brave ... decide if you want to enforce others to
> use bash or csh or tsch or zsh or hudred-other-sh
>
> - each will have a different priority of files it will
> read or skip reading because some other files existed
> and it will over-ride the defaults, while in other cases,
> the defaults is still read, and user-defined changes
> overrides the system defaults
>
> the search order is dfferent for user login vs scripts run by
> root or anybody/anything else ( like cron vs your scripts calling
> other scripts )
>
> which shell you use is defined in /etc/passed for that user
>
> to add more whackyness, different distro put their defaults
> in different directories and different filenames which will
> add confusion
>
> for simplicity... let's say you use /bin/bash on debian,
> which implies your the search order is:
>
> anything defined in one file can be redefined in the
> subsquent files
>
> - user defined changes override system defined variables
>
> system files
> /etc/profile = read first for user login
>
> /etc/bash.bashrc = interactive shell only
>
>
> user can do what you want in these files ..
>
> # after /etc/profile, search in order for the first executable:
> ~/.bash_profile
> ~/.bash_login
> ~/.profile - not read if the files exists before it
>
> ~/.bashrc interactive shell read it if it exists
>
> ~/.morebashfiles ??
>
> more user stuff
> ~/.alias always put aliases outside of bash files
> for portability
>
> ~/.login
> ~/.logout
>
> http://developer.novell.com/wiki/index.php/Bash_-_What_happens_when_you_invoke_bash
>
> - the above ignores other "different" distros and other shells
I am running sid with kde3.5. I have some aliases in /etc/bash.bashrc.
In konsole as user if I type alias I get all aliases. But in root
konsole, I don't get aliaes. Why?
--
L.V.Gandhi
http://lvgandhi.tripod.com/
linux user No.205042
Reply to:
- References:
- Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- From: Felipe Caballero Gil <loco.loop@gmail.com>
- Re: Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- From: Alvin Oga <aoga@mail.Linux-Consulting.com>
- Prev by Date:
Re: another lost one
- Next by Date:
Re: gpg error - testing ?
- Previous by thread:
Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- Next by thread:
Re: I'm really confused by bash, .bashrc, .bash_profile, .profile, etc, etc, etc
- Index(es):