Start by updating the packages list by typing:
1 | $ sudo apt update |
Install nodejs using the apt package manager:
1 | $ sudo apt install nodejs npm |
The Node.js executable from the Ubuntu repositories is named nodejs instead of node because of a conflict with another package.
To launch the REPL Terminal: (Pressing Ctrl + C twice exits!)
1 | $ nodejs |
To verify the installation execute the following command:
1 | $ node -v && npm -v |