Home

NVM

NVM stands for Node Version Manager. It is a shell-based tool designed to manage multiple installations of Node.js on a single machine. It allows developers to install, switch between, and isolate different Node.js versions without affecting the system-wide Node. The original project nvm is primarily for Unix-like systems; Windows users typically use a separate port called nvm-windows.

NVM works by keeping downloaded Node.js distributions in a dedicated directory (commonly ~/.nvm) and updating shell

Common commands include: install to fetch a specific version, use to switch the active version, ls to

Installation is typically done by a shell script or package manager on Unix-like systems, for example curl

Notes: NVM keeps Node versions in user space, avoiding system-wide changes. It can coexist with OS package

PATH
and
alias
settings
so
that
the
active
version
is
used
when
running
node
and
npm.
It
supports
per-project
version
control
via
a
.nvmrc
file,
so
a
project
can
specify
which
Node
version
to
use
when
entering
the
directory.
list
installed
versions,
alias
to
create
shortcuts,
and
default
to
set
the
default
version.
Example:
nvm
install
18.16.0;
nvm
use
18.16.0;
nvm
ls;
nvm
alias
default
18.16.0.
or
wget
piping
to
bash.
After
installation,
the
user
must
reload
their
shell
or
source
the
profile
file.
On
Windows,
the
nvm-windows
project
provides
an
installer;
it
functions
similarly
but
uses
a
separate
command
set
and
paths.
managers,
but
care
is
needed
to
avoid
conflicts.
It
does
not
manage
Node
versions
outside
the
supported
distributions.