I'm using composer to install development tools in raspbian. How do I add ~/.composer/vendor/bin to the PATH so I can accessed installed packages from composer in raspbian?

I tried adding to ~/.profile/ but when I reboot it no longer works.

Any ideas?

  • are we supposed to guess what you have?
    – Milliways
    Mar 8, 2014 at 21:51
  • I'm not sure ~ works in the .profile file. Better try the full path, so /home/pi/.composer/vendor/bin
    – Gerben
    Mar 8, 2014 at 22:36
  • 1
    @Gerben or $HOME
    – Milliways
    Mar 8, 2014 at 23:27

1 Answer 1


The following adds a line to /etc/profile to export PATH after startup. ( /my/subFolder is added to the current PATHS )

sudo sed -i 's/export PATH/PATH=$PATH:\/my\/subFolder\nexport PATH/g' /etc/profile

Keep in mind that Raspbian is Debian based. You may want to have a look at how it is done in Debian (and similarly can be done in Raspbian). Something you may need to look at also is runLevel you're running (i.e. singleUser, multiUser or GUI) - but the above may be enough.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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