1.To get this version, you can use the apt package manager. Refresh your local package index first:
sudo apt update
2.Then install Node.js:
sudo apt install nodejs
3.Check that the install was successful by querying node
for its version number:
node -v
Check that the install was successful by querying node
for its version number:
v12.22.9
If the package in the repositories suits your needs, this is all you need to do to get set up with Node.js. In most cases, you’ll also want to also install npm
, the Node.js package manager. You can do this by installing the npm package with apt:
sudo apt install npm