Make sure your Ubuntu is up to date and patched.
$ sudo apt update $ sudo apt upgrade
Node.js is available within Ubuntu’s default software repositories, making it possible to install it using conventional package management tools. After confirming the installation, apt
will install Node.js and all required dependencies.
$ sudo apt install nodejs -y
Check Node.js version
$ nodejs -v # OUTPUT v10.19.0
Have fun!