New Check out the curated list of the finest design resources I've gathered for you! Take a look →

How to Install NVM using Homebrew in Mac – A Comprehensive Guide

This guide will walk you through the step-by-step process of installing NVM (Node Version Manager) on your Mac using Homebrew. With the help of this tutorial, you will be able to easily manage and switch between different versions of Node.js on your Mac.


For this tutorial, you need:

  • A Mac computer
  • Xcode Command Line Tools
  • Homebrew package manager

How to Install NVM using Homebrew in Mac – Step-by-Step Tutorial

  1. Open Terminal on your Mac. You can do this by searching for “Terminal” in Spotlight or navigating to Applications > Utilities > Terminal.
  2. Install Homebrew by executing the following command in Terminal: /bin/bash -c "$(curl -fsSL" This command will download and install Homebrew on your Mac.
  3. Once Homebrew is installed, run the following command to update it: brew update This will update Homebrew to the latest version.
  4. Next, install NVM using Homebrew with the following command:brew install nvm This will install NVM on your Mac.
  5. After the installation is complete, add the NVM environment variables to your shell profile. You can do this by running the following command:echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bash_profile Note: If you are using the Zsh shell, replace ~/.bash_profile with ~/.zshrc.
  6. Reload your shell profile to apply the changes by running the command:source ~/.bash_profile or source ~/.zshrc (for Zsh shell users)
  7. To verify that NVM is installed correctly, you can run the command: nvm --version This should display the version of NVM installed on your Mac.

Wrapping Up

I hope this comprehensive article has provided you with a clear and helpful guide on how to install NVM using Homebrew in Mac. With NVM, you can now easily manage and switch between different versions of Node.js on your Mac. For more insightful tips and articles, feel free to explore my website.

Rizwan Aritonang

An independent WordPress & Front-End Developer from Bandung, Indonesia.

Get In Touch

Leave a Comment