In this article, we’ll explain 4 steps to install Nodejs on Ubuntu 20.04.
Node.js is an open-source, cross-platform, back-end JavaScript runtime environment that executes JavaScript code outside a web browser.
Prerequisites
- A Ubuntu 20.04 installed dedicated server or KVM VPS.
- A root user access or normal user with administrative privileges.
Step 1 – Keep the server up to date
# apt update -y
Step 2 – Download NodeJS
Download latest stable release of NodeJS.
# curl -sL https://deb.nodesource.com/setup_15.x | sudo -E bash –
Step 3 – Install NodeJS
Next, install the NodeJS using following command:
# apt-get install -y nodejs
Step 4 – Verify the installation
# node -v && npm -v
Output:
v15.6.0
7.4.0
That’s it. The installation has been completed successfully.
In this article, we have seen 4 steps to install Nodejs on Ubuntu 20.04.