change PATH permanently on Ubuntu [closed]

I'd like to add to PATH the value ":/home/me/play/"
for the installation of Play! framework.
so I ran this command:

PATH=$PATH:/home/me/play

it worked. but in the next time I checked, the value changed back to the old one.

so I guess I didn't "saved" the new value, right?

how do you do that?


Add

export PATH=$PATH:/home/me/play

to your ~/.profile and execute

source ~/.profile 

in order to immediately reflect changes to your current terminal instance.


Add the following line in your .profile file in your home directory (using vi ~/.profile):

PATH=$PATH:/home/me/play
export PATH

Then, for the change to take effect, simply type in your terminal:

$ . ~/.profile

Try to add export PATH=$PATH:/home/me/play in ~/.bashrc file.