
上QQ阅读APP看书,第一时间看更新
Linux (shell)
On Linux, the installation can easily be done using the Terminal with the following steps:
- First of all, open up the Terminal.
- Next, install curl as you'll need it to install Node.js: sudo apt install curl
- Then, install Node.js from the NodeSource (https://nodesource.com) repository:
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
- You should now have both node and npm installed. Here's a link to the reference installation guide for Debian-and Ubuntu-based distributions: https://nodejs.org/en/download/package-manager/#debian-and-ubuntu-based-linux-distributions.
nvm ( https://github.com/nvm-sh/nvm) is also a popular option to manage multiple node/ npm installations.
Let's now see how to update npm.