Ubuntu · Web Development

How to setup Node.js on Ubuntu

Steps to install NodeJs ubuntu

  1. Download nodejs from Nodejs website.
    wget https://nodejs.org/dist/v4.4.7/node-v4.4.7-linux-x64.tar.xz
  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

Leave a Reply

Your email address will not be published. Required fields are marked *