1. Summary
# Listing all remote versions
fnm ls-remote

# Listing all installed ones
fnm ls

# Installing
fnm install <version>

# Uninstalling
fnm uninstall <version>

# Installing node of the latest LTS version
fnm install --lts

# Setting an alias
fnm alias <version> <name>

# Shortcut for setting 'default' as an alias
fnm default <version>

# Removing an alias
fnm unalias <name>

# Using a Node of a particular version
fnm use <version>

# Displaying the version of currently used Node
fnm current

It is recommended to install Yarn through the npm package manager, which comes bundled with Node.js when you install it on your system.

Once you have npm installed you can run the following both to install and upgrade Yarn:

npm install --global yarn


  1. fnm, Fast Node Manager
curl -fsSL https://fnm.vercel.app/install | bash
  1. or, install rust
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

info: downloading installer

Welcome to Rust!

This will download and install the official compiler for the Rust
programming language, and its package manager, Cargo.

Rustup metadata and toolchains will be installed into the Rustup
home directory, located at:

  /home/alexlai/.rustup

This can be modified with the RUSTUP_HOME environment variable.

The Cargo home directory is located at:

  /home/alexlai/.cargo

This can be modified with the CARGO_HOME environment variable.

The cargo, rustc, rustup and other commands will be added to
Cargo's bin directory, located at:

  /home/alexlai/.cargo/bin

This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /home/alexlai/.profile
  /home/alexlai/.bash_profile
  /home/alexlai/.bashrc

You can uninstall at any time with rustup self uninstall and
these changes will be reverted.

Current installation options:


   default host triple: aarch64-unknown-linux-gnu
     default toolchain: stable (default)
               profile: default
  modify PATH variable: yes

1) Proceed with installation (default)
2) Customize installation
3) Cancel installation
>
info: profile set to 'default'
info: default host triple is aarch64-unknown-linux-gnu
info: syncing channel updates for 'stable-aarch64-unknown-linux-gnu'
info: latest update on 2023-11-16, rust version 1.74.0 (79e9716c9 2023-11-13)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 14.4 MiB /  14.4 MiB (100 %)  11.2 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
 31.9 MiB /  31.9 MiB (100 %)  11.2 MiB/s in  2s ETA:  0s
info: downloading component 'rustc'
 76.1 MiB /  76.1 MiB (100 %)  11.2 MiB/s in  6s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 14.4 MiB /  14.4 MiB (100 %)   6.8 MiB/s in  2s ETA:  0s
info: installing component 'rust-std'
 31.9 MiB /  31.9 MiB (100 %)  10.8 MiB/s in  2s ETA:  0s
info: installing component 'rustc'
 76.1 MiB /  76.1 MiB (100 %)  11.8 MiB/s in  6s ETA:  0s
info: installing component 'rustfmt'
info: default toolchain set to 'stable-aarch64-unknown-linux-gnu'

  stable-aarch64-unknown-linux-gnu installed - rustc 1.74.0 (79e9716c9 2023-11-13)


Rust is installed now. Great!

To get started you may need to restart your current shell.
This would reload your PATH environment variable to include
Cargo's bin directory ($HOME/.cargo/bin).

To configure your current shell, run:
source "$HOME/.cargo/env"

$ cat ~/.bashrc 
#
# ~/.bashrc
#

# If not running interactively, don't do anything
[[ $- != *i* ]] && return

alias ls='ls --color=auto'
alias grep='grep --color=auto'
PS1='[\u@\h \W]\$ '

# fcitx5
GTK_IM_MODULE=fcitx
QT_IM_MODULE=fcitx
XMODIFIERS=@im=fcitx

# tilix
if [ $TILIX_ID ] || [ $VTE_VERSION ]; then
        source /etc/profile.d/vte.sh
fi
. "$HOME/.cargo/env"
[alexlai@orgpi58G ~]$ source ~/.cargo/env
[alexlai@orgpi58G ~]$ echo $PATH
/home/alexlai/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl
  1. If rust language is installed,
$ pacman -Sy base-devel
$ cargo install fnm
  1. list available
$ fnm ls-remote
...
v20.8.0
v20.8.1
v20.9.0 (Iron)
v20.10.0 (Iron)
v21.0.0
v21.1.0
v21.2.0
This file contains a list of codenames for LTS releases. Codenames for future releases are subject to change.

    Argon (4.x 2015)
    Boron (6.x 2016)
    Carbon (8.x 2017)
    Dubnium (10.x 2018)
    Erbium (12.x 2019)
    Fermium (14.x 2020)
    Gallium (16.x 2021)
    Hydrogen (18.x 2022)
    Iron (20.x 2023)
    Jod (22.x 2024)

  1. install
fnm install v21.2.0 or `fnm install --lts
fnm install --lts
Installing Node v20.10.0 (arm64)
  1. How
[alexlai@orgpi58G ~]$ fnm current
v20.10.0
[alexlai@orgpi58G ~]$ which node
/run/user/1026/fnm_multishells/5697_1701155773747/bin/node
[alexlai@orgpi58G ~]$ which yarn
which: no yarn in (/run/user/1026/fnm_multishells/5697_1701155773747/bin:/home/alexlai/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/bin:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl)
[alexlai@orgpi58G ~]$ which npm
/run/user/1026/fnm_multishells/5697_1701155773747/bin/npm
[alexlai@orgpi58G ~]$ which npx
/run/user/1026/fnm_multishells/5697_1701155773747/bin/npx
[alexlai@orgpi58G ~]$ node --version
v20.10.0
[alexlai@orgpi58G ~]$ npm --version
10.2.3
[alexlai@orgpi58G ~]$ npx --version
10.2.3

[alexlai@orgpi58G ~]$ npm --global install yarn

added 1 package in 823ms
[alexlai@orgpi58G ~]$ which yarn
/run/user/1026/fnm_multishells/10788_1701214199942/bin/yarn
[alexlai@orgpi58G ~]$ yarn --version
1.22.21