Linux set environment variables

I will show you how to update your PATH vari­able 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 vari­able when you install node glob­ally on your local machine. But when you install node on remote server and you want to check for depen­den­cies you will have to update your PATH vari­able so the script can find the node modules.

You may also like...