[ale] bash.rc?

aaron aaron at pd.org
Tue Mar 5 02:50:38 EST 2002


On Monday 04 March 2002 23:33, you wrote:
> man bash explains it all.  It's a bit confusing exactly when bash uses
> what startup files - I'd have to look at the man page myself.

Also...
Comments and command blocks in the (default RH) bash startup scripts 
themselves show the expected initializing files and execution sequence.  
They recommend that user aliases and functions be in
  /home/[user]/.bashrc

Of course, ~/.bash_profile is the file that actually executes ~/.bashrc, 
which in turn sets the global aliases and functions by executing 
/etc/bashrc.

Somewhere in the startup process /etc/profile also gets run, which sets 
global paths and executes any short additional global functions, aliases 
and shell variables set by scripts in /etc/profile.d/  
 
-----
# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
   . ~/.bashrc
fi

-----
-----
# .bashrc

# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'

# Source global definitions
if [ -f /etc/bashrc ]; then
   . /etc/bashrc
fi

-----

...then the global bash config files in /etc/ also note their intended 
purposes and cross reference each other...

-----
# /etc/bashrc

# System wide functions and aliases
# Environment stuff goes in /etc/profile

-----
-----
# /etc/profile

# System wide environment and startup programs, for login setup
# Functions and aliases go in /etc/bashrc

-----

<grin>
Not confusing in the least.
</grin>

peace
aaron

> > -----Original Message-----
> > From: Stephen Turner [mailto:artic_knight at yahoo.com]
> > Sent: Monday, March 04, 2002 11:28 PM
> > To: ale at ale.org
> > Subject: [ale] bash.rc?
> >
> >
> > ** in redhat and debian and all here was a script like
> > a bash.rc script in /home/root or /home/usr which
> > allowed for aliases and such to be loaded... do i just
> > create this script? or do i have to set it to get
> > called from somewhere?


---
This message has been sent through the ALE general discussion list.
See http://www.ale.org/mailing-lists.shtml for more info. Problems should be
sent to listmaster at ale dot org.






More information about the Ale mailing list