LinuxWindows

Where Does fnm Keep Node Versions and Pins?

Where the fnm version manager installs and switches Node runtime versions under FNM_DIR, plus aliases.

Last updated

fnm roots its installs at FNM_DIR: node-versions/ for runtimes, aliases/ for default and named pointers. Defaults land in the OS data home unless FNM_DIR overrides them.

Pins live separately in .node-version or .nvmrc files per project, resolved on cd when configured. Active versions surface through per session multishell links, which explains how concurrent terminals disagree harmlessly. The fnm env line in your profile wires all of it together. The ls-remote command lists installable versions from the mirror.

Where fnm stores this, by platform

Linux
~/.local/share/fnm (FNM_DIR default)

node-versions/ plus aliases/ under the FNM_DIR root. The fnm env init line must run in every shell profile; without it, shims silently fall back to system Node. Multishell links in temp dirs need no backup.

Windows
%LOCALAPPDATA%\fnm (FNM_DIR default)

Same tree under LocalAppData by default. PowerShell profiles need the fnm env init too. FNM_DIR moves the root anywhere, including shared disks for multi user boxes.

Frequently asked questions

where does fnm store version pins

In .node-version or .nvmrc files in the project (fnm reads both). The --use-on-cd flag with fnm env switches automatically on directory change. Version file strategy (local versus recursive) decides how far up it looks. Commit the file so the team shares it.

where are fnm node versions installed

Under node-versions/ inside the FNM_DIR root (default ~/.local/share/fnm on Unix, %LOCALAPPDATA%\fnm on Windows), with aliases/ beside it. fnm ls lists them. Delete a version folder only via fnm uninstall to keep multishell links consistent.

how do i move the fnm directory

Set FNM_DIR before the fnm env init line in your shell profile. Everything (versions, aliases) moves under it. Multishell session links stay ephemeral in temp dirs regardless, so only the root relocates.

why do two terminals show different node versions

No. Each shell session gets an ephemeral multishell link that vanishes on exit, pointing at the real install. That is why two terminals can run different Node versions without fighting. Missing version errors mean the shell init line never ran.

Notice an outdated path? Let us know.