How to Update Node.js to the latest version on Ubuntu

Md. Maruf Sarker - Nov 7 '21 - - Dev Community

Nodejs Official Website

Step - 1:

1st of all you need to download the latest version of Nodejs from the official Nodejs website

Step - 2:

Go to the correct path using command line or GUI.
Using Command line

cd Downloads/node-v17.0.1-linux-x64.tar.xz/
tar -xf node-v17.0.1-linux-x64.tar.xz
Enter fullscreen mode Exit fullscreen mode

Check Current Node version

node --version
v14.17.0
Enter fullscreen mode Exit fullscreen mode

To upgrade

sudo n latest
Enter fullscreen mode Exit fullscreen mode

Check Updated Node version

node --version
v17.0.1
Enter fullscreen mode Exit fullscreen mode

Nodejs version Updated

If you are using graphical interface then go to the destination path. Click right button and select extract here. Open the bin folder.
Directories and files
right click and select open in terminal
To upgrade

sudo n latest
Enter fullscreen mode Exit fullscreen mode

Check Updated Node version

node --version
v17.0.1
Enter fullscreen mode Exit fullscreen mode

Nodejs version Updated
Thanks, if you like this article useful then smash the like button. Share it with your friends. Stay Tuned.

If you want to learn more about Linux Command Line then you watch my Playlist

. . . . . . . . .
Terabox Video Player