How to setup Node.js on Ubuntu

Sunday, November 11, 2018 By Ashish Doneriya

Steps to install NodeJs ubuntu

  1. Download nodejs from Nodejs website.
  2. Extract the compressed file
    tar xf node-v4.4.7-linux-x64.tar.xz node-v4.4.7-linux-x64/
  3. Add nodejs bin path to PATH environment
    echo '
    export PATH=$PATH:/home/username/nodejs/bin' >> /home/username/.bashrc
  4. 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