PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Sunday, November 13, 2022

[FIXED] How to open bashrc file from plesk server and add a new PHP PATH VERSION

 November 13, 2022     command-line, plesk     No comments   

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)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing