Re: [SLUG] Making an alias permanent...I need help

From: Levi Bard (levi@bard.sytes.net)
Date: Wed Oct 16 2002 - 00:40:05 EDT


BASH(1) ...
       When bash is invoked as an interactive login shell, or as a non-inter-
       active shell with the --login option, it first reads and executes com-
       mands from the file /etc/profile, if that file exists. After reading
       that file, it looks for ~/.bash_profile, ~/.bash_login, and ~/.profile,
       in that order, and reads and executes commands from the first one that
       exists and is readable. The --noprofile option may be used when the
       shell is started to inhibit this behavior.

       When a login shell exits, bash reads and executes commands from the
       file ~/.bash_logout, if it exists.

       When an interactive shell that is not a login shell is started, bash
       reads and executes commands from ~/.bashrc, if that file exists. This
       may be inhibited by using the --norc option. The --rcfile file option
       will force bash to read and execute commands from file instead of
       ~/.bashrc.

In other words, only interactive, nonlogin bash shells read ~/.bashrc . You may want to put the alias in ~/.bash_profile as well, or only in ~/.bash_profile. Since some terminals invoke a login shell and some don't, you may want to set your xterms accordingly.

hth,
Levi

On 15 Oct 2002 22:17:20 -0400
"David R. Meyer" <dmeyer07@tampabay.rr.com> wrote:

> I am trying to make an alias permanent by adding it to the .bashrc
> file. However, I don't appear to be doing it right because it doesn't
> take. I am using pico to edit the file as I am not all that comfortable
> with vi (it's been a while).
>
> This is what is looks like:
>
> alias labs='ssh -l DT_xxxxxxx_xxxxx labs2.digitalthink.com'
>
> I know this works, but I've not gotten it to be permanent yet.
> Can someone fill me in as to what I am doing wrong?
>
> Thanks,
>
> Dave
>
>

-- 
Levi Bard
levi@bard.sytes.net
http://bard.sytes.net
GooSNES - Lightweight, featureful GTK+ snes9x frontend - http://bard.sytes.net/goosnes/
TakCD - highly embeddable commandline cd player - http://bard.sytes.net/takcd/



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 16:15:48 EDT