Install the latest stable version of node and NPM on Ubuntu

Source: Internet
Author: User

Background

Install ubuntu apt The latest LTS version through the official installation tool, node and I am a bit obsessive-compulsive, like the pursuit of new things, that is, trying to install the latest version of the node , so this article has been produced, attached ubuntu installation node and npmcommand-line command:

install nodejs-legacysudo apt install npm
Latest Version Installation method

1. Installationnpm

sudo apt install npm

2. Upgrade npm to the latest version

sudo npm install [email protected] -g

At this point npm -v you can find npm the version number is the latest version 3.10.3 ;
3 nodejs . Install the module for installationn

sudo npm install -g n

4, then through n the module installation of the specified version nodejs , the n module more information please refer to the official documentation

//安装官方最新版本sudo n latest//安装官方稳定版本sudo n stable//安装官方最新LTS版本sudo n lts

We install the stable version nodejs , and then we node -v can find the node installation is successful and the version number is v6.2.0 stable.

Install the latest stable version of node and NPM on Ubuntu

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.