Basic bash help

trlists at clayst.com trlists at clayst.com
Tue Sep 21 10:58:03 EDT 2004


Thanks to you and miah for all the tips.  Everything is working fine 
now.

The aliases for cp/mv/rm were right there, I just got mixed up between 
my usual login home dir and root home dir files so I didn't see them (I 
don't usually log in as root to start off).

> Just what do you mean by global?  "My own aliases" and "global" don't
> mesh for me.  

I meant "aliases I create that I want to use for anyone who logs in", 
sorry for the confusing language!

> I'm assuming that you mean really global, i.e. for all users, system
> wide.  The usual place is to put them in /etc/bashrc or /etc/profile,
> depending on if you need them in non-interactive shells. 

Got it, thanks.

> one of the standard default places, i.e.  /etc/profile for global
> aliases, and .profile or .bashrc for user-specific aliases.  

Thanks, that's what I wanted to know.

> The bash shell has the idea that shells can be login shells
> or non-login shells.  It tries to source different files, based on
> whether or not the shell is a login shell.  Shells run in xterms are
> usually NOT login shells, unless you (or your vendor) has done
> something interesting to make that happen (i.e. run xterm with the -ls
> option, set a resource, etc.).

Thanks, I had read that and forgotten it.  You are right that the 
vendor set it up to source files form all over the place.  IAC the RH 
system is always accessed via SSH.  I'm not clear if bash considers 
that to be a login or non-login shell but the "normal" scripts get run 
regardless.  I guess from your description it looks like it considers 
that to be non-login since the vendor scripts are needed to run the 
other various scripts.

For the Slackware system I may log in via SSH or on the system console 
depending on what I'm doing.  Would both be considered login shells?

--
Tom






More information about the Discuss mailing list