How to setup Node.js on Ubuntu


Steps to install NodeJs ubuntu

  1. Download nodejs from Nodejs website.
  1. Extract the compressed file
tar xf node-v4.4.7-linux-x64.tar.xz node-v4.4.7-linux-x64/
  1. Add nodejs bin path to PATH environment
echo '
export PATH=$PATH:/home/username/nodejs/bin' >> /home/username/.bashrc
  1. That's it

Now to run nodejs just type nodejs in your terminal.

You can also install package yarn. It is just like mvn (java). If you have to add any package type yarn add

Published in: Web Development - Ubuntu
Originally Published On : Jul 06, 2016