How to Install Node.js for Ubuntu 20.04 LTS?
Nodejs is a cross-platform JavaScript runtime environment that executes JavaScript code outside the browser. It allows the creation of web servers and networking tools using JavaScript. Nodejs can be supported on the software like Windows, macOS, and Linux. It was built on the Google V8 JavaScript engine. It produces dynamic webpage content before the page is sent to the user’s web browser. Let’s get the process of installation, launching, and the removal process fo Nodejs on the latest released version of Ubuntu 20.04 LTS Focal Fossa.
The latest Ubuntu release comes with a lot of yummy features you can see for yourself HERE
Requirements for Nodejs:
- Developer: NodeSource
- App Version: 13.11.0
- App Size: 29 MB
- Channel: Stable
Instaling Node.js
- Using the terminal shortcut, CTRL+ALT+T
- Copy & paste the below command on your terminal and perform the task
sudo snap install node --channel=13/stable --classic
- If asked for a password, type the system password to authenticate the installation process.
- Wait for a few minutes, the installation of Nodejs will be completed.
Confirm Installation
- Copy & paste the below command on your terminal and perform the task
node -v
npm -v
- The first command prints out the version of node.js while the second prints out the version of npm
Removing Node.js?
Copy and paste the commands below to remove node.js
sudo snap remove node
Conclusion
The above article describes the process of installing and uninstalling Node.js on the Ubuntu 20.04 LTS, feel free to suggest, comment, and share if this was helpful.
Thank you for visiting my blog, I will write useful articles weekly, do well to check them out.
Stay safe with ❤️
Useful article, thank you :)
It is a personal preference (and not using Ubuntu as distro), but I prefer to use a "dedicated" node version manager like nvm
, n, etc
By the way, with the method presented in the article, is sudo
needed to install global modules?
I totally agree with you on using node with an nvm
Yes, you will still need sudo
to install global modules following the above instructions.
But I can always do this
sudo chown -R `whoami` /usr/local
and will not need to use sudo
to install global modules.
Comments (2)