Electron Projects
上QQ阅读APP看书,第一时间看更新

Installing Node.js on Ubuntu

Ubuntu usually doesn't ship with the Node.js and NPM tools out of the box. You need to install them separately.

To install Node.js, follow these steps:

  1. Run the following command:
      sudo apt install -y nodejs
  1. Now, we need to verify that Node.js has been installed. You can check the version that you've installed in the Terminal application by using the following command:
      node --version

The system's output, which will be the version's value, will be v8.11.4 or higher.

To install NPM, follow these steps:

  1. Use the following command:
      sudo apt install -y npm
  1. The fastest way to check that NPM has been installed is to check its version. You can do so by using the following command:
      npm --version

The version number should be 5.8.0 or higher.