Install Node

To install the latest version of Node.js, you can follow these steps:

Using Node Version Manager (NVM) (recommended for managing multiple Node.js versions):

  1. First, install NVM if you haven't already. You can do this via the terminal:

    curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

    or

    wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash

    Replace v0.39.7 with the latest version if it has been updated.

    Close and reopen your terminal to start using NVM.

  2. Install the latest version of Node.js:

    nvm install node

    This command installs the latest stable version of Node.js.

  3. Verify the installation:

    node --version
  4. To install Node.js version 22 specifically:

    nvm install 22

    This command installs Node.js version 22.


By following these steps, you can manage and install different versions of Node.js easily using NVM.

Last updated