Home » Linux Host, Ubuntu, SysAdmin » Commands and Packages » How to install and update npm on Ubuntu ?

How to install and update npm on Ubuntu ?

npm is the package manager for the Node JavaScript platform. When we used installed npm on Ubuntu using following command

$ sudo apt install npm

By default ubuntu unstalled npm version 3.5.2, which you can check as,

$ npm -version

But the software, we were trying to compile required npm version more than 3.5.2, so we upgraded npm to latest stable version using below command,

$ sudo npm install npm@latest -g

Now you can check the version of latest npm as,

$ npm -version

Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

Leave a Comment