You may the following steps to install Node.js on Ubuntu 20.04.
Firstly, we will update the package manager using the command:
sudo apt update
Next, we will install the
curl package, which we will use to download the Node.js installation package:
sudo apt install curl
Now download the Node.js installation package from the NodeSource repository:
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Install Node.js using the
apt package manager:
sudo apt install nodejs
Check the version number to ensure that Node.js has been installed correctly:
That's it! You have successfully installed Node.js on Ubuntu 20.04 using the
apt package manager.