- Once the NodeSource repository is enabled, install Node.js and npm: sudo apt install nodejs. The nodejs package contains both the node and npm binaries.
- Verify that the Node.js and npm were successfully installed by printing their versions: node --version v14.2.0 npm --version 6.14.4.