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?
To make the change permanent, enter the command PATH=$PATH:/opt/bin into your home directory's .
Permanently add a directory to $PATHbashrc file of the user you want to change. Use nano or your favorite text editor to open the file, stored in the home directory. At the end of this file, put your new directory that you wish to permanently add to $PATH. Save your changes and exit the file.
Permanently Set $PATH for All Users To permanently set system PATH for all users on the system, append the following lines at the end of the /etc/profile file. On some Linux distros, you can also use the /etc/bash. bashrc file (if it exists)but it should be sourced in /etc/profile for changes in it to work.
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With