1

I'm trying to add PHPUnit to the system path so that I can just use it from any terminal window. I installed PHPUnit using composer, then I added the following lines on the .bashrc file in the HOME directory then opened a new terminal but it doesn't seem like the terminal recognizes phpunit. Any ideas?

PATH=media/wern/Files/tools/vendor/eher/phpunit/bin
PATH=media/wern/Files/tools/vendor/bin

1 Answer 1

3

First of all, environment variables are better set at end of ~/.profile.

The correct syntax is:

PATH=$PATH:/media/wern/Files/tools/vendor/eher/phpunit/bin
PATH=$PATH:/media/wern/Files/tools/vendor/bin

so that the two directories are added to PATH and do not substitute the previous content.
Also, see that I added a / before media, because a relative path has no meaning in this context, and I think you did an error.

Last advice, you have to restart your session to see the changes.

1
  • source ~/.profile is enough to restart the session, without having to close/open terminal. May 10, 2015 at 13:01

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .