Adding a permanent value to $PATH on Raspbian Adding a permanent value to $PATH on Raspbian unix unix

Adding a permanent value to $PATH on Raspbian


You should add an absolute path, not a relative one. You added this to your path: node-v0.10.24-linux-arm-armv6j-vfp-hard/bin. That's a relative path, not an absolute one (absolute paths start with a /). You can change your line to:

PATH=$PATH:DIR/node-v0.10.24-linux-arm-armv6j-vfp-hard/bin

where DIR is the full path of the directory containing node-v0.10.24-linux-arm-armv6j-vfp-hard.

It's probably a good idea for you to read a bit on how this all works - it's not that complicated once you see it explained. See https://superuser.com/questions/238987/how-does-unix-search-for-executable-files for an example.


You have $HOME already set to your home directory.

So you can use this in your .profile:

PATH="$PATH:$HOME:$HOME/bin:$HOME/node-v0.10.24-linux-arm-ar‌​mv6j-vfp-hard/bin"

If you set it as an absolute path you will not be able to copy that .profile to another user who is set up similarly.

I see there is another question that deals with installing node.js on Debian - and must admit I am surprised it is installed per-user. So if you do the install for another login you might want to copy your .profile to the new login to solve this same issue. There would be no per-user editing required if you use the $HOME variable like this. Just a simple copy or cut and paste.

For reference, here is that other question/answer: install node.js on debian