This content originally appeared on DEV Community and was authored by Md. Maruf Sarker
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
Check Current Node version
node --version
v14.17.0
To upgrade
sudo n latest
Check Updated Node version
node --version
v17.0.1
If you are using graphical interface then go to the destination path. Click right button and select extract here. Open the bin folder.

right click and select open in terminal
To upgrade
sudo n latest
Check Updated Node version
node --version
v17.0.1

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
This content originally appeared on DEV Community and was authored by Md. Maruf Sarker
Md. Maruf Sarker | Sciencx (2021-11-07T14:51:14+00:00) How to Update Node.js to the latest version on Ubuntu. Retrieved from https://www.scien.cx/2021/11/07/how-to-update-node-js-to-the-latest-version-on-ubuntu/
Please log in to upload a file.
There are no updates yet.
Click the Upload button above to add an update.
