Linux set environment variables

I will show you how to update your PATH variable on Linux machine so it can always find the node and npm.

export NPM_HOME=/FOO/npm/node-v0.12.5-linux-x64/bin
export PATH=$PATH:$NPM_HOME

You do not need to update your PATH variable when you install node globally on your local machine. But when you install node on remote server and you want to check for dependencies you will have to update your PATH variable so the script can find the node modules.

You may also like...