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 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
Assuming you want to add this path for all users on the system, add the following line to your /etc/profile.d/play.sh
(and possibly play.csh
, etc):
PATH=$PATH:/home/me/play
export PATH
Try to add export PATH=$PATH:/home/me/play
in ~/.bashrc file.
Source: Stackoverflow.com