- How To Install Node.js on Linux Mint
- Solution 1: Install Node.js from repositories in Linux Mint
- Step 1.1: Update packages and install Node.js
- Step 1.2: Install npm on Linux Mint
- Step 1.3: Upgrade Node.js which is installed from repositories
- Solution 2: Install Node.js with nvm on Linux Mint
- Step 2.1 Install nvm on Linux Mint
- Step 2.2 List Node versions with nvm
- Step 2.3 Install Node.js with nvm
- Step 2.4 Use multiple Node.js versions with nvm
- Update Node.js Version to 10/12/13 on Linux ( Ubuntu / Debian / Mint / CentOS / RHEL )
- 👉 Any questions? Please comment below.
- Share on
- Leave a comment
- You may also enjoy
- [SOLVED] Fix Kubernetes Flannel & CoreDNS Failure with Error: x509: certificate is valid for , , not
- JavaScript: Remove element from Array — by index / value / position / range / filter function (programmatically)
- [SOLVED] Fix Kubernetes Client Certificates Issue with Error: Part of the existing bootstrap client certificate is expired . failed to run Kubelet: unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory
- [SOLVED] Fix npm ERR! code EINTEGRITY , integrity checksum failed , tarball data seems to be corrupted , npm ERR! shasum check failed , npm WARN registry Unexpected warning issues during npm install
- 3 Ways to Update Node.js to Latest Version on Linux Systems
- Option 1: Update Node.js with NVM (Node Version Manager)
- Option 2: Update Node.js with NPM (Node Package Manager)
- Option 3: Update Node.js with Binary Packages
- Update Node.js to Latest Version on Windows and macOS
- Option 1: Update Node.js on Windows and macOS with Installer
- Option 2: Update Node.js on Windows and macOS with NPM
How To Install Node.js on Linux Mint
Need to install a Node.js in Linux Mint? If so, I’ll show you two ways of installing Node.js on Linux Mint. The two ways are:
Solution 1: Install Node.js from repositories in Linux Mint
Step 1.1: Update packages and install Node.js
It’s a good practice before any installation from the repositories to update the packages. This can be done by:
Then you can install latest available Node.js by next command:
You will need to enter your root password.
Once the installation is complete you can check the version and verify the installation by:
Step 1.2: Install npm on Linux Mint
Many programs like JupyterLab will require npm to be installed in order to work. npm which stands for Node Package Manager can be installed on Linux Mint by:
Step 1.3: Upgrade Node.js which is installed from repositories
Often the installed Node.js version from the repositories will be outdated. If you need to upgrade Node.js to the latest version you can use module n .
The module n will take care for the upgrade of Node.js when it’s installed from PPA.
Then you can install the stable Node.js by:
Note 1: Depending on the OS, versions etc you may need to use sudo.
Note 2: There was a naming problem in the past for package node in Ubuntu. Which causes coexistence of node and nodejs commands in Linux Mint. Some programs will require nodejs others node . This should be handled with alias. You can check the output of the next command in order to find what versions do you have:
Solution 2: Install Node.js with nvm on Linux Mint
The second way which is better and my preferred one is installing nvm and using it to install node.
Step 2.1 Install nvm on Linux Mint
The nvm installation guide is available on : nvm Install & Update Script. So in order to install nvm on Linux Mint you can follow. Get the latest installation script from the page above:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash
Note 1: this will download and run the script. If you like you can download it, review it and then install it.
Note 2: You need to start a new terminal or run command: source ~/.bashrc in order to use nvm command.
Step 2.2 List Node versions with nvm
There are many different node packages available. In order to list all of them with nvm you can use command:
v14.14.0 v14.15.0 (LTS: Fermium) -> v14.15.1 (Latest LTS: Fermium) v15.0.0 v15.0.1 v15.1.0 v15.2.0 v15.2.1 v15.3.0 v15.4.0
Step 2.3 Install Node.js with nvm
When you find what version you like to use then you can install it by:
Step 2.4 Use multiple Node.js versions with nvm
It’s common to have several Node.js versions. The best way to manage them is with nvm . Local Node.js versions can be listed by:
v12.18.3 -> v14.15.1 system default -> node (-> v14.15.1) iojs -> N/A (default) unstable -> N/A (default) node -> stable (-> v14.15.1) (default) stable -> 14.15 (-> v14.15.1) (default) lts/* -> lts/fermium (-> v14.15.1) lts/argon -> v4.9.1 (-> N/A) lts/boron -> v6.17.1 (-> N/A) lts/carbon -> v8.17.0 (-> N/A) lts/dubnium -> v10.23.0 (-> N/A) lts/erbium -> v12.20.0 (-> N/A) lts/fermium -> v14.15.1
If you need to change the default one you can do it by:
Finally, check the Node version by:
By using SoftHints — Python, Linux, Pandas , you agree to our Cookie Policy.
Update Node.js Version to 10/12/13 on Linux ( Ubuntu / Debian / Mint / CentOS / RHEL )
This quick tutorial guides you to update Node.js 10/12/13 on any linux machine.
$ 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
👉 Any questions? Please comment below.
Updated: February 08, 2020
Share on
Leave a comment
You may also enjoy
[SOLVED] Fix Kubernetes Flannel & CoreDNS Failure with Error: x509: certificate is valid for , , not
Use the correct cluster configuration for your control plane when regenerating new certificates
JavaScript: Remove element from Array — by index / value / position / range / filter function (programmatically)
Many ways to remove items from a JavaScript array
[SOLVED] Fix Kubernetes Client Certificates Issue with Error: Part of the existing bootstrap client certificate is expired . failed to run Kubelet: unable to load bootstrap kubeconfig: stat /etc/kubernetes/bootstrap-kubelet.conf: no such file or directory
Renew the expiring/expired Kubernetes PKI (client certificates & keys)
[SOLVED] Fix npm ERR! code EINTEGRITY , integrity checksum failed , tarball data seems to be corrupted , npm ERR! shasum check failed , npm WARN registry Unexpected warning issues during npm install
Clean npm cache, node_modules, package-lock.json files to recover from all ‘npm ERR! code EINTEGRITY’ error messages during ‘npm install’
How to Update Node.js to Latest Version
Node.js is an open-source JavaScript runtime environment. Since Node.js has an active community of users, minor updates of the software come out every few weeks.
You may be using Node.js as a layer of the MEAN stack or in a different JS framework. Either way, make sure to update Node.js regularly to ensure system security.
There are several ways to install Node.js and NPM. Likewise, there are several ways to update your Node.js version, depending on the operating system running on your machine.
In this article, you will learn how to update to the latest Node.js version on Linux, Windows, and macOS.
3 Ways to Update Node.js to Latest Version on Linux Systems
There are different ways to update Node.js if you are using a Linux-based system. Although using the Node Version Manager is the easiest and most recommended option, you can also update with the local package manager or by downloading the binary packages.
Option 1: Update Node.js with NVM (Node Version Manager)
The best way to upgrade Node.js is with NVM, a practical tool for managing multiple Node.js versions.
1. Start by updating the package repository with the command:
2. Install NVM using the curl command:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
Note: If you don’t have curl , install the utility by running the command: sudo apt install curl .
Alternatively, you use wget and run the command:
wget -q0- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh | bash
3. Close and reopen the terminal for system to recognize the changes or run the command:
5. Then, verify if you have successfully installed NVM:
6. Before upgrading Node.js, check which version you have running on the system:
7. Now you can check for newly available releases with:
8. To install the latest version, use the nvm command with the specific Node.js version:
nvm install [version.number]
Option 2: Update Node.js with NPM (Node Package Manager)
As an alternative, you can use Node’s official package manager to update Node.js. NPM is a tool for installing and managing package dependencies.
If you have Node on your system, you have NPM, as well. With the npm command, you can check running Node.js versions and install the latest release.
By adding the n module, you can interactively manage Node.js versions.
1. First, clear the npm cache:
2. Install n, Node’s version manager:
3. With the n module installed, you can use it to:
Install the latest stable version:
Note: Some Ubuntu distros may respond with the command not found output after running the n command. To fix this issue run sudo -E env «PATH=$PATH» [command] . For example, to install the latest stable version, as in the example above, you would run sudo -E env «PATH=$PATH» n stable .
Install the latest release:
Install a specific version:
Option 3: Update Node.js with Binary Packages
Updating Node.js with binary packages is the least recommended option. However, if it is the only way you can upgrade to the latest Node.js version, follow the steps outlined below.
1. Navigate to Node’s official downloads page where you can find all available packages. There you can download the source code or pre-built installer for the LTS versions or the latest release.
2. You can either download the package from your browser or find the version number you need and add it to the wget command:
wget https://nodejs.org/dist/v14.17.0/node-v14.17.0-linux-x64.tar.xz
3. Next, install xz-utils used to extract the binary package:
sudo apt-get install xz-utils
4. Extract and install the package with the command:
sudo tar -C /usr/local --strip-components 1 -xJf node-v14.17.0-linux-x64.tar.xz
Update Node.js to Latest Version on Windows and macOS
Updating Node.js on Windows and macOS follows the same principles.
There are two simple ways to upgrade:
- Download the latest Node.js release from its official download page and install the new Node.js release.
- Install the n module and update Node.js inside the terminal window.
Option 1: Update Node.js on Windows and macOS with Installer
One way to update your Node.js is to go to its official download page and install the newest release. Bz doing so, the system should overwrite the older version with the updated one.
1. Navigate to the Node.js website and click on the latest stable version or the newest current release (with the latest features).
2. After deciding the version, click on the Windows or the macOS Installer, depending on the system you are using. The system downloads the package and stores it in the specified directory.
3. Once the download is complete, run the installer.
4. The Node.js Setup Wizard appears and guides you through the installation.
5. Accept the License Agreement by checking the box and click Next.
6. Choose the destination folder where you want to install Node.js.
7. Node.js allows you to select how you want to install the Node features. Change the way the features are installed by clicking on the icons in the tree.
8. With that, the latest Node.js is ready to install. Click Install to confirm, wait until the installation completes, and click Finish.
9. Check the Node.js version with the command:
Note: Sometimes, the system fails to overwrite the older Node.js release and you may end up with two versions. If such problems occur, you may want to consider updating with NPM, outlined in the section below.
Option 2: Update Node.js on Windows and macOS with NPM
If you want to upgrade Node.js from the command line, use the n model within the npm command. The n feature allows you to interact with different Node.js versions.
1. Before updating the Node.js release, check which version you are currently using with:
2. Next, clear npm cache with the command:
3. Install n globally:
4. Now that you have n installed, you can use the module to install the latest stable release of Node.js:
Alternatively, you can install the Node.js release with the latest features:
Or, install a specific version number with:
The best part of open-source technology is its strong community of users constantly working on upgrading the software.
Node.js is a good example of such software as new versions come out regularly. Users can choose whether they want to work with the LTS (the long-term supported version) or the latest version with the newest features.
This article should have helped you update Node.js on any operating system.
Sofija Simic is an experienced Technical Writer. Alongside her educational background in teaching and writing, she has had a lifelong passion for information technology. She is committed to unscrambling confusing IT concepts and streamlining intricate software installations.
Node.js is an open-source cross-platform JavaScript (JS) runtime environment. It is used for building fast.
The MEAN stack is an open-source JavaScript (JS) framework used for developing robust web applications. It is.
Node Package Manager (npm) is Node’s official package manager, used for installing and managing packages.
Node.js is a software application that runs JavaScript code. It’s typically used for running scripts on the.