You can use zsh-nvm or enable it yourself by adding following lines to your ~/.zshrc

 export NVM_DIR=~/.nvm
 [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"

Extra:

For faster shell initialization, I use lazynvm which only loads node when needed

lazynvm() {
  unset -f nvm node npm
  export NVM_DIR=~/.nvm
  [ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh"  # This loads nvm
}

nvm() {
  lazynvm 
  nvm $@
}
 
node() {
  lazynvm
  node $@
}
 
npm() {
  lazynvm
  npm $@
}

npx() {
  lazynvm
  npx $@
}

Reference: Lazy load nvm for faster shell start

Answer from Ryan W on Stack Overflow
🌐
GitHub
gist.github.com › tomsihap › e703b9b063ecc101f5a4fc0b01a514c9
Install NVM in Ubuntu 18.04 with ZSH · GitHub
Install NVM in Ubuntu 18.04 with ZSH. GitHub Gist: instantly share code, notes, and snippets.
🌐
DEV Community
dev.to › saanchitapaul › install-nvm-node-version-manager-inside-zsh-34ke
Install nvm (Node Version Manager) inside zsh - DEV Community
March 16, 2023 - To install nvm (Node Version Manager) inside zsh, you can follow these steps: Open your terminal and... Tagged with nvm, node, zsh, linux.
🌐
GitHub
github.com › nvm-sh › nvm
GitHub - nvm-sh/nvm: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions
Create one with touch ~/.zshrc and run the install script again. If you use bash, the previous default shell, your system may not have .bash_profile or .bashrc files where the command is set up.
Starred by 90.3K users
Forked by 9.7K users
Languages   Shell 98.0% | Makefile 1.2%
🌐
Medium
medium.com › @shaxzad544 › install-nvm-node-version-manager-in-zsh-on-a-linux-system-follow-these-simple-steps-4d5dc355428f
Install nvm (Node Version Manager) in zsh on a Linux system, follow these simple steps: | by shaxzad ali | Medium
December 28, 2023 - Install nvm (Node Version Manager) in zsh on a Linux system, follow these simple steps: First, open your terminal. 2. Type cd ~ to go to your home directory. 3. Type git clone …
🌐
Boekhoff
boekhoff.info › how-to-install-nodejs-and-npm-using-nvm-and-zsh-nvm
How to install NodeJS and NPM using NVM and Zsh-NVM?
Load Zsh-NVM as a Zsh-plugin. Therefore simply add plugins+=(zsh-nvm) to your ~/.zshrc. When opening a new terminal window, NVM will be automatically installed by Zsh-NVM.
🌐
GoLinuxCloud
golinuxcloud.com › home › ubuntu › how to install nvm on ubuntu? [solved]
How to install NVM on Ubuntu? [SOLVED] | GoLinuxCloud
January 1, 2024 - * (HEAD detached at FETCH_HEAD) master => Compressing and cleaning up git repository => Appending nvm source string to /home/foc/.bashrc => Appending bash_completion source string to /home/foc/.bashrc => Close and reopen your terminal to start using nvm or run the following to use it now: export NVM_DIR="$HOME/.nvm" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm [ -s "$NVM_DIR/bash_completion" ] && \. "$NVM_DIR/bash_completion" # This loads nvm bash_completion · Reload the .bashrc: foc@ubuntu22:~$ source ~/.bashrc · If you are using different shell the command should be different, For example: zsh: source ~/.zshrc · ksh: . ~/.profile · Installed NVM version: foc@ubuntu22:~$ nvm --version 0.39.2 ·
🌐
Jimfrenette
jimfrenette.com › 2018 › 04 › wsl-ubuntu-zsh-nvm-etc
WSL ubuntu zsh nvm etc. | JimFrenette.com
By default, Yarn installs nodejs as a system-wide dependency. After updating your .zshrc profile to load the nvm plugin, close and re-open the Ubuntu app and to install nvm when the plugin is loaded for the first time.
Find elsewhere
🌐
TecAdmin
tecadmin.net › how-to-install-nvm-on-ubuntu-20-04
How To Install NVM on Ubuntu 20.04 – TecAdmin
April 26, 2025 - Here is the step-by-step instructions to install and use NVM on Ubuntu systems.
🌐
Qirolab
qirolab.com › posts › how-to-install-nvm-node-version-manager-on-ubuntu-system
How To Install NVM (Node Version Manager) on Ubuntu System? | Qirolab
January 16, 2021 - curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.37.2/install.sh | bash · The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bash_profile, ~/.zshrc, ~/.profile, or ~/.bashrc).
🌐
Medium
medium.com › @agarwalprashant355 › how-do-i-install-nvm-802a66f2662
How do i install NVM?. If you get the error “zsh
December 8, 2022 - You can do this by running source ~/.zshrc (or the path to your shell configuration file) in your terminal. Once nvm is installed and properly configured in your shell, you should be able to run the nvm command without getting the "zsh: command not found: nvm" error.
🌐
GitHub
github.com › lukechilds › zsh-nvm
GitHub - lukechilds/zsh-nvm: Zsh plugin for installing, updating and loading nvm
Zsh plugin for installing, updating and loading nvm - lukechilds/zsh-nvm
Starred by 2.4K users
Forked by 119 users
Languages   Shell
🌐
YouTube
youtube.com › watch
#6: Install NVM (Node Version Manager) | Setup Web Development Environment Ubuntu - YouTube
nvm is a version manager for node.js, Using the NVM tool makes it easier to install and manage multiple versions of Node.js on a single local environment.In ...
Published   February 1, 2021
🌐
idroot
idroot.us › home › how to install nvm on ubuntu 22.04 lts
How To Install NVM on Ubuntu 22.04 LTS - idroot
June 24, 2024 - Step 1. To ensure a smooth installation process, it’s essential to update your Ubuntu system and install the necessary build tools. Follow these steps to prepare your system: sudo apt update sudo apt upgrade sudo apt install wget apt-transport-https gnupg2 software-properties-common · Step 2. Installing NVM on Ubuntu 22.04.
🌐
Communityhealthtoolkit
forum.communityhealthtoolkit.org › technical support
Error while piping nvm to zsh shell during installation - Technical Support - Community Health Toolkit
May 24, 2023 - Hi everyone, I am using Ubuntu 22.04 and on zsh shell. While following the instructions to Install NodeJS, npm, and Docker as part of the CHT Core dev environment setup I ran into an issue. I ran the first command and that worked as expected. export nvm_version=`curl -s https://api.github.com/repos/nvm-sh/nvm/releases/latest | jq -r .name` However, when I ran the second command curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/$nvm_version/install.sh | $SHELL .
🌐
PhoenixNAP
phoenixnap.com › home › kb › devops and development › how to install nvm on ubuntu
How to Install NVM on Ubuntu | phoenixNAP KB
April 24, 2025 - Note: For other shells, adjust the profile accordingly (e.g., ~/.zshrc for zsh). 4. Check the NVM version to verify the installation: ... Once NVM is installed and running on your Ubuntu system, you can manage multiple Node.js versions.
🌐
freeCodeCamp
freecodecamp.org › news › node-version-manager-nvm-install-guide
Node Version Manager – NVM Install Guide
September 9, 2022 - The installation process from step 1 should also automatically add the nvm configuration to your profile. If you're using zsh, that would be ~/.zshrc.