$linuxjunkies
>

fnm(1)

fnm is a fast Node.js version manager that lets you install and switch between multiple Node.js versions without affecting system binaries.

UbuntuDebianFedoraArch

Synopsis

fnm [COMMAND] [OPTIONS]

Description

fnm (Fast Node Manager) is a cross-platform Node.js version manager written in Rust. It allows you to install multiple versions of Node.js and easily switch between them on a per-project or global basis. Unlike nvm, fnm is significantly faster and uses symlinks rather than PATH manipulation.

fnm stores Node.js versions in a local directory (typically ~/.fnm) and provides shell integration to automatically detect and use the correct version when entering a directory with a .nvmrc or .node-version file.

Common options

FlagWhat it does
--versionShow fnm version number and exit
--helpDisplay help information for fnm or a specific command
--node-dist-mirrorSet custom mirror URL for downloading Node.js (default: nodejs.org)
--fnm-dirSet custom directory where Node.js versions are installed (default: ~/.fnm)
--log-levelSet logging level: all, debug, info, warn, error, quiet
--corepack-enabledEnable or disable Corepack (pnpm, yarn, npm bundled with Node.js)
--archSpecify architecture for Node.js installation (x64, arm64, etc.)

Examples

Install the latest version of Node.js available

fnm install --latest

Install a specific Node.js version (18.17.0)

fnm install 18.17.0

Switch to the latest installed Node.js v18.x version

fnm use 18

List all installed Node.js versions; current version marked with '*'

fnm list

Set the global default Node.js version

fnm default 20.10.0

Remove the specified Node.js version from disk

fnm uninstall 16.20.0

Generate shell initialization code for bash with auto-switching support

fnm env --use-on-cd --shell bash

Run a command using a specific Node.js version without permanently switching

fnm exec --using=18 npm install

Related commands