Using curl, or wget, download the installation script. In the URL below make sure you replace
v0.35.0 with the latest version of nvm.
curl -sL https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.0/install.sh -o install_nvm.sh
Source the new instructions NVM added to
.bashrc during the installation process. You can either exit and re-enter the shell console, or manually source your
.bashrc file. This file is almost always located at the root of your home directory.
As an alternate method, you can execute the new instructions in the same console to apply them immediately.
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
You can confirm the version of NVM that is running with the following command:
First Day of Job as a Software Developer
June 9th 2022
How to Install Node.js Locally with Node Version Manager (nvm)
April 9th 2022
How to pass coding tests and assessments for a software developer job
June 11th 2022