This quick tutorial guides you to update Node.js 10/12/13 on any linux machine.

$ node -v
  • Install n npm module in order to easily update the node version in your environment.
$ sudo npm cache clean -f
$ sudo npm install -g n
  • n module lets you update node version to current stable version (stable), current latest version (latest), or any specific version (#.#.#).
$ sudo n stable

$ sudo n latest

$ sudo n 10.15.3
  • You can use n with any version tag to update Node.js in your machine to any version of your choice.
// node v10.x
$ sudo n 10.15.3

// node v12.x
$ sudo n 12.14.1

// node v13.x
$ sudo n 13.5.0

✅ Tested OS's : RHEL 7+, CentOS 7+, Ubuntu 18.04+, Debian 8+
✅ Tested Gear : Cloud (AWS EC2), On-Prem (Bare Metal)

👉 Any questions? Please comment below.

Leave a comment