Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have downloaded the Node.JS tar from the official website. I now have to set /home/admin/Desktop/node-v0.8.16-linux-x64/bin as the working directory to run it from a terminal. However, I don't want to have to cd in that directory every time, and I don't want the node-v0.8.16-linux-x64 folder on my desktop all the time.

Where is a convenient place to put the node-v0.8.16-linux-x64 so that:

  • it's "hidden" from the user (i.e. not on the desktop)
  • I can run node from a terminal regardless of the current working directory (i.e. it's automatically in my path)
share|improve this question

1 Answer 1

up vote 1 down vote accepted

A similar question was asked and discussed on U&L.

The short answer is to place the executable in $HOME/bin (creating the directory if necessary). Most shell initialization files include $HOME/bin in the user $PATH, but you may need to manually add it to your $PATH.

Assuming you are using bash, add to your ~/.bashrc:

PATH=$PATH:$HOME/bin

share|improve this answer

Your Answer

 
discard

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.