Issue
I want to open my .bashrc file and and add a new PATH PHP VERSION export PATH=/opt/plesk/php/7.1/bin:$PATH;
In my root ssh connection i made : ls -a and i saw .bashrc ! but how i could open the file and add my new path ?
Sorry i'm really not a king in terms of command lines
Thanks a lot in advance if someone could help
Solution
To open file in editor you can use the following command:
vi ~/.bashrc
Or you can just add the line without opening file in editor:
echo "export PATH=/opt/plesk/php/7.1/bin:$PATH;" >> ~/.bashrc
After editing the file, run the following command (it will apply changes):
source ~/.bashrc
Also, make sure that a ~/.profile
is there (sometimes it's missing). Otherwise, create it like this:
echo '[[ -f ~/.bashrc ]] && source ~/.bashrc' > ~/.profile
Answered By - Elvis Plesky Answer Checked By - Marilyn (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.