In order to get this version, we just have to use the apt package manager. We should refresh our local package index first, and then install from the repositories:

  • sudo apt-get update
  • sudo apt-get install nodejs

If the package in the repositories suits your needs, this is all that you need to do to get set up with Node.js. In most cases, you’ll also want to also install npm, which is the Node.js package manager. You can do this by typing:

  • sudo apt-get install npm

Gõ npm chạy để có câu lệnh cài đặt npm-legacy

Nguon tham khao: https://www.digitalocean.com/community/tutorials/how-to-install-node-js-on-ubuntu-16-04
Advertisements