Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.