June 2000
Beginner
704 pages
14h 55m
English
Changes made to shell variables in the .bashrc and profile files under the /etc directory affect all users and are systemwide. Individual users can make changes, or local definitions, to the .bashrc and .profile under their home directories. Local environment variables are defined in .profile like so:
# .profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User-specific environment and startup programs
PATH=$PATH:$HOME/bin
ENV=$HOME/.bashrc
USERNAME=""
export USERNAME ENV PATH
Lines beginning with a pound sign (#) are comments and are ignored by the shell. When you log in, the bash shell uses this program to first look for a file called .bashrc in your home directory, and then sets some basic ...
Read now
Unlock full access