Linux: Add a folder to the PATH

I had to compile a separated version of python to run some software without remove the current version that is dependent of other applications inside the server.

When I tried to install some other dependent libraries of this version of python, It was not found because binary folder was not in the path.

To add the binary folder temporary I did in this way:

Before add it, the PATH looked like this:

$ echo $PATH


To add the folder to my PATH you just need to update the value of path in this way:

$ PATH=$PATH:/usr/local/python2.7/bin
Now if you print again the PATH values you will se something like this:

$ echo $PATH