What is Nodejs？¶
Nodejs usually uses the command
npm install xxx to install third-party packages, which requires us to install the npm tool, similar to the pip tool in python.
Install or update nodejs and npm¶
Run the following commands to install and update nodejs and npm.
sudo apt-get update sudo apt-get install nodejs sudo apt-get install npm sudo npm install npm -g
Then check the current Node version with the following command.
The following command checks the current npm version.