I've downloaded nodejs I want to install it on Ubuntu 16.10 ,I have the node folder with this files

bin  CHANGELOG.md  include  lib  LICENSE  README.md  share

Where I have to place it to use node?


You can place them anywhere and link to a bin folder. The common places are /usr/share, /usr/local/share. On my personal computer, I usually place things like that in my home directory like that: ~/bin/node/*.

However, I would generally not recommend it with node, unless you have no choice. I would rather go with NVM. This way you can install any version of node you want and switch them if needed.

  • ~/bin is already in $PATH. Just create ~/bin if it doesn't already exist. – heynnema Mar 12 '17 at 14:50
  • yeah, but I never put binaries directly in ~/bin. Rather folders, but yeah, you could symlink ~/bin/node -> ~/bin/nodejs/bin/node – Mat Mar 13 '17 at 14:07
  • Yes, exactly. I was trying to convince @George of that. – heynnema Mar 13 '17 at 14:53

Let give this simple method:

  1. Create a folder /home/$USERNAME/devenv

  2. Download binaries into folder in step 1

  3. untar the node file

  4. Create a symbolic link in the /home/$USERNAME/devenv

    ln -s untared-node-file-name node
  5. Place it in your path in the /home/$USERNAME/.profile file with at the end:

  6. Source the /home/$USERNAME/.profile by running this in terminal:

    source ~/.profile
  7. Now check with node -v and npm -v


  • To update just download new version and change symbolic link.
  • 1
    No need to create the denenv dir, link it, and edit .profile. Just create ~/bin, and it's already in the $PATH. – heynnema Mar 12 '17 at 14:44
  • Yes if you don't need the extra luggage, but I prefer to group things – George Udosen Mar 12 '17 at 15:43
  • Just drop folders into ~/bin and you can still group things by folder name. No? – heynnema Mar 12 '17 at 15:49
  • Can you be more explicit? – George Udosen Mar 12 '17 at 15:54
  • It sounds like to keep things organized, you're creating new folders (devenv) in your home directory. That can get kind of messy, yes? Instead, drop the nodejs folder into ~/bin, and if need be, create a link in ~/bin that points to the executable in the folder. Type echo $PATH to see the current path, and you'll see that ~/bin is the first item. – heynnema Mar 12 '17 at 16:07

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.