node and nodejs have identical functionality but they are different versions because they are two different packages in Ubuntu Software. nodejs is the older version apt package and node is the more up-to-date snap package. Most Node.js users will be happier using the up-to-date node snap package, because it is updated automatically and it can be configured to either be updated automatically to the latest stable version or to not be updated except within a specific Node.js release. The latter feature is designed for Node.js users who need to work with a specific Node.js release. The node snap package also supports the installation of multiple Node.js releases, which allows the user to choose which Node.js release to use for each project.
One important difference between node and nodejs is that node has npm built-in in the snap package, whereas in nodejs npm must be installed separately. Since the npm in the node package is much more up-to-date than the apt version of npm, it is recommended to use the more up-to-date version of npm for both node and nodejs. After installing the node snap package, run the following command to enable npm update checking:
sudo chown -R $USER:$(id -gn $USER) /home/your-username/.config
Replace your-username
in the above command with your own username.
For more information about node snap package installation and usage read this answer.
node
andnodejs
are different executables by different installed versions of Node. Do anapt-cache policy node nodejs | grep Installed
and you should see two separate version strings. – Thomas Ward May 01 '18 at 14:39