How to install specific version / latest node.js on ubuntu

If you want to install node.js which is gaining popularity in recent days, you can follow below steps,

npm is the package manager for node.js JavaScript which we need to install in first,

 $ sudo apt-get install npm 
 $ sudo npm install n -g 
 $ sudo n latest 

Now, you can check which all node versions are supported and which is the latest installed version as,

 $ node -v 

and check all node verions as,

 $ n ls 

Now, lets say if you have seen latest node version is 9.4.0 and want to install “6.8.1” version, use below command,

 $ sudo n 6.8.1 

Now, you can see version 6.8.1 is installed,

 $ node -v 
Android Android Commands Android Java Applications Application Libraries Application Stack / User Interface Bash / Shell Scripts Commands and Packages Compilation Content Management System - CMS Core Kernel C Programs Development & Build Development Environment Setup Errors & Failures Flutter git Go Language Programs Hardware Platforms HTML JAVA Programs Kernel & Device Drivers Linux, OS Concepts and Networking Linux Device Drivers Linux Host, Ubuntu, SysAdmin Linux Kernel Linux Networking Middleware Libraries, HAL Monetization / Google AdSense Multimedia - Audio, Video, Images NDK / Middleware / HAL OS Concepts PHP Programming Languages RaspberryPi Scripting and Automation Search Engine Optimisation ( SEO ) Social Media Socurce Code Management ( SCM ) System Administration, Security Testing and Debugging Uncategorized User Interface Web design and development Wordpress Yocto / Bitbake / Openembedded
Tags:

One Response

  1. Matt Kiss November 10, 2018

Leave a Reply / Ask Question