[indiana-discuss] BASH login shell script

Richard Elling Richard.Elling at Sun.COM
Tue Dec 30 20:43:12 PST 2008


Brandon Barker wrote:
> I've spent some time searching online and reading docs, but nothing I've done has worked ... which system wide shell script is read by a bash login instance - whether it is through GNOME Terminal, ssh, or anything else?  For instance, one of the things I've tried is /etc/profile, but this does not work.  
>
> Are which config scripts that are sourced by bash controlled as compile time options or are they hardcoded in the source?
>   

They are documented in the man page as:
    /etc/profile
          The systemwide initialization file, executed for  login
          shells
     ~/.bash_profile
          The personal initialization file,  executed  for  login
          shells
     ~/.bashrc
          The individual per-interactive-shell startup file
     ~/.bash_logout
          The individual login shell cleanup file, executed  when
          a login shell exits
     ~/.inputrc
          Individual readline initialization file

But what usually trips people up is that a gnome terminal does not,
by default, start a login session.  You can change this by editing the
gnome-terminal profile, select the Title and Command tab, and check
the "run command as a login shell"
 -- richard




More information about the indiana-discuss mailing list