I wanted to add the current directory (.) to my PATH variable and tried to put the command in the .bash_profile file, but it didn't work. When I used the file /etc/profile it did execute. Open the file using the command <sudo nedit /etc/profile> and add the following line : <PATH=.:$PATH> to include the current directory in the PATH variable. When you log in the next time it will be set. If you read the Linux in a Nutshell book it says the following: Bash reads these files: 1. /etc/profile. Executed automatically at login, first. 2. The first file found from this list: ~/.bash_profile, ~/.bash_login, ~/.profile. Executed automatically at login. Second. 3. ~/.bashrc is read by every shell, after the login files.
I coudn't get ~/.bash_profile and ~/.bash_login to work, but ~/.profile was executed. I put the following line <PATH=~/bin:"${PATH}"> in my .profile to add my bin directory to the PATH variable. Use the command <echo $PATH> to find out if all paths have been added.