GNU/Linux >> Linux Esercitazione >  >> Ubuntu

Come installare Node.js e npm su Ubuntu

Che cos'è Node.js

Node.js è un runtime JavaScript open source e multipiattaforma che permette di eseguire JavaScript anche fuori dal browser.

Che cos'è npm

npm è il package manager di Node.js, usato per installare, aggiornare e gestire dipendenze.

Installazione dal repository Ubuntu

Abilita NodeSource e installa:

sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_12.x | sudo -E bash -
sudo apt install nodejs

Verifica:

node --version
npm --version

Installazione tramite PPA NodeSource

curl -sL https://deb.nodesource.com/setup_16.x -o nodesource_setup.sh
sudo bash nodesource_setup.sh
sudo apt install nodejs

Installazione con NVM

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
source ~/.bashrc
nvm list-remote
nvm install v17.0.1
nvm use 17.0.1
Ubuntu
  1. Come installare Node.js e NPM su CentOS

  2. Come installare Node.js e npm su Debian 11 — tre metodi a confronto

  3. Come installare Node.js e NPM su Ubuntu 20.04/18.04

  4. Installare Node.js su Ubuntu 16.04

  5. Come installare Node.js e npm su Ubuntu 20.04

Installare Node.js e NPM su Ubuntu 18.04: due metodi pratici

Installare Node.js e npm su Ubuntu Linux

Come installare Node.js su Ubuntu 14.04: tre approcci diversi

Tre modi per installare Node.js su Ubuntu 16.04

Come installare Node.js su Ubuntu 19.04 (Disco Dingo)

Installare Node.js e npm su Ubuntu 22.04 LTS: due metodi