How to install latest version of nodejs in Ubuntu or Linux

Spread the Knowledge

Steps:
1. Login to Ubuntu or Linux machine using ssh client like putty
2. Run command: sudo -s
3. Run command: sudo apt-get install curl
4. Run command: curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
5. Run command: sudo apt-get install -y nodejs

6. Install latest version of node js using command: sudo apt-get install -y nodejs

4. Verify the installation by using command: node -v

Chetan