How to Update the Node Version in Ubuntu

  4285 views   6 months ago NodeJS

In this article i will share with you how to update letest vertion of node in ubuntu OS.

sudo npm install -g n
sudo n stable

Then you got the following output in terminal.

installing : node-v14.16.0
   mkdir : /usr/local/n/versions/node/14.16.0
   fetch : https://nodejs.org/dist/v14.16.0/node-v14.16.0-linux-x64.tar.xz
installed : v14.16.0 (with npm 6.14.11)

To upgrade to latest version (and not current stable) version, you can use

sudo n latest

Output

installing : node-v15.10.0
   mkdir : /usr/local/n/versions/node/15.10.0
   fetch : https://nodejs.org/dist/v15.10.0/node-v15.10.0-linux-x64.tar.xz
installed : v15.10.0 (with npm 7.5.3)

then last you check your current node version by using the following command.

node -v

Output

v15.10.0

i hope you like this araticle.

Author : Harsukh Makwana
Harsukh Makwana

Hi, My name is Harsukh Makwana. i have been work with many programming language like php, python, javascript, node, react, anguler, etc.. since last 5 year. if you have any issue or want me hire then contact me on [email protected]

Related Articles