Forrest logo
back to the fnm tool

fnm:tldr:5ddc7

fnm: Set the default Node.js version.
$ fnm default ${node_version}
try on your machine

The command "fnm default ${node_version}" sets the default version of Node.js to be used by the fnm (Fast Node Manager) tool.

Here's a breakdown of the command:

  • "fnm" is the command-line tool used to manage different versions of Node.js on your system.
  • "default" is a subcommand of fnm that sets the default version of Node.js.
  • "${node_version}" is a placeholder for the specific Node.js version you want to set as the default. You need to replace it with the actual version number, such as "14.17.0" or "v16.3.0".

When you run this command with the correct Node.js version, fnm will configure your system to use that version as the default. This means that whenever you run node or npm commands, fnm will automatically use the specified version.

Setting a default version is useful when you have multiple Node.js versions installed on your system and want to use a specific version by default, without having to specify it every time you run a Node.js command.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the fnm tool