bash Configuration


bash's Configuration Files

As it turns out bash has 2 different login files. As it turns out .bash_profile only gets read if and only if you login from a remote machine. Take note that .bash_profile itself reads in your .bashrc file as well. If you open a local shell on a machine only .bashrc gets read.

So as it turns out if you want aliases to be executed regardless, then you should really put them in the .bashrc file.

Lastly take note that there are no default bash configuration files currently being provided for GL. Instead I have provided these 2 that seem to get the job done...


.bashrc

#  File:              .bashrc
#
#  Created by:        Daniel J. Hood
#  Created on:        Tuesday, January 14, 2003
#
#  Last Modified by:  Daniel J. Hood
#  Last Modified on:  Tuesday, January 14, 2003
#
#  Description:       A default .bashrc for GL
#

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

############# set the prompt ##########################

# uncomment out 1 and only one below....

# this is hostname and time
PS1="\h-(\@): "

# this is hostname and history number
#PS1="\h-(\!)# "

# this is hostname and current working directory
#PS1="\h-(\w)# "

# this is hostname and shortened current working directory
#PS1="\h-(\W)# "

############# path manipulation #######################

# add ~/bin to the path, cwd as well
PATH="$PATH:$HOME/bin:./"


################# env variables #######################

# make sure that you change this to your username
MAIL="/afs/umbc.edu/users/u/s/username/Mail/inbox"

export PATH   
unset USERNAME

###### User specific aliases and functions ############
alias rm="rm -i"

.bash_profile

# .bash_profile

# Get the aliases and functions
# In a nutshell get whatever is in your .bashrc config file
if [ -f ~/.bashrc ]; then
	. ~/.bashrc
fi

Daniel J. Hood
Last modified: Tue Jan 14 23:33:11 EST 2003