DEV Community

Salman Khattak
Salman Khattak

Posted on

nvm alias default 'lts/*'

If not already familiar, nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and windows WSL. Read more here http://nvm.sh

I wanted to set node LTS as default version and found the documentation was lacking. So here you go, mostly note to self:

Set latest lts as the default node version in your shell
nvm alias default 'lts/*'

Verify that the change persists by closing the shell window, opening a new one, then:
node --version or nvm version

Top comments (0)