fnm exec --using=22 node --version

Category: Node.js & npm/yarn

fnm exec --using=22 node --version

Run a command with a specific Node

Executes node --version with the 22.x runtime without changing the shell's active version, ideal for one-off checks in scripts. The --using flag selects the version, and any command can follow. Handy for testing against several majors.
Looking for more? Search all 7,657 commands — works offline, in English or Spanish, and fixes typos.