Sign up ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

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?

share|improve this question

1 Answer 1

up vote 2 down vote accepted

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

The correct syntax is:


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
source ~/.profile is enough to restart the session, without having to close/open terminal. – Pedro Dusso May 10 at 13:01

Your Answer


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.