linux update node code example
Example 1: updating node js ubuntu
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
Example 2: update nodejs
npm cache clean -f
npm install -g n
Install the latest stable version: n stable
Install the latest release: n latest
Example 3: how to update node js version
>node -v
>npm install -g n
>n stable
>n 10.16.0
Example 4: ubuntu update nodejs
# Using Ubuntu
curl -sL https://deb.nodesource.com/setup_13.x | sudo -E bash -
sudo apt-get install -y nodejs
# Using Debian, as root
curl -sL https://deb.nodesource.com/setup_13.x | bash -
apt-get install -y nodejs
Example 5: linux command to update nodejs
wget https://nodejs.org/dist/v12.13.1/node-v12.13.1-linux-x64.tar.xz
Example 6: linux command to update nodejs
sudo apt-get install xz-utils