In your home directory, there are two files, ".bash_profile" and ".bashrc", which are the initialization file in the Linux. When you open a shell, they are automatically executed as a shell initialization.The path setting is contained in these files.
The difference? According to [Josh Staiger],
- ".bash_profile" is invoked for a log-in session. Log-in? Yeah, log-in. It means anything that you usually need to provide user name and password such as log-in physically at the boot-up or using ssh
- ".bashrc" is invoked for a non-log-in session. For example, when you have already log-in to a graphical environment such as KDE. All you have to do is to click on a terminal icon and you don't have to provide username/password to open a shell.
In fact, you can see in the file ".bash_profile" the following
if [ -f ~/.bashrc ]; then
source ~/.bashrc
fi
which basically invokes ".bashrc" if it exists.
For the Cygwin environment, you can add your own initialization in either ".bashrc" or ".bash_profile". Wanna try? Add the following lines into the files and restart the shell.
- Add to ".bashrc"
echo Add2.bashrc
- Add to ".bash_profile"
echo Add2.bash_profile
PATH=${PATH}:
export =
ENJOY...
No comments:
Post a Comment