sudo apt update- Install curl if you don't have it already
sudo apt install -y curl- Download the nvm script file with curl and run it
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.3/install.sh | bashcommand -v nvm- If the output is
nvm, then nvm is installed correctly.
- To install the latest LTS version of Node.js
nvm install --ltsnode --version- This should output the version of Node.js that was installed.