DEV Community

Brent Vanwildemeersch
Brent Vanwildemeersch

Posted on • Updated on

How to set default NVM version for all Linux shells

After installing NVM and setting up a nvm version using:

nvm use ${NODE_VERSION_NUMBER}
Enter fullscreen mode Exit fullscreen mode

I realized that not every shell I started had the NODE_VERSION_NUMBER that I had set earlier

Setting a default node version using NVM on Linux for all shells/terminals can be done using the following command.

nvm alias default ${NODE_VERSION_NUMBER}
Enter fullscreen mode Exit fullscreen mode

Restarting the terminall/shell will now have the correct NODE_VERSION_NUMBER set for NVM

Top comments (0)