
Here are the steps to install NVM in Garuda Linux:
1. Check your default shell:
Open a terminal and run
echo $SHELLto determine your current shell.If it's not Bash or Zsh, you'll need to switch to one of them for NVM to work properly. You can change your default shell using Garuda's settings or by editing your
~/.profilefile.
2. Install NVM:
Choose one of the following methods:
Using the Arch User Repository (AUR):
- Run
yay -S nvmto install NVM from the AUR.
- Run
Manual installation:
Run the following command in your terminal: Bash
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.3/install.sh | bash
3. Activate NVM in your current session:
- Run
source ~/.bashrc(orsource ~/.zshrcif you're using Zsh).
4. Verify installation:
- Run
nvm --versionto check if NVM is installed correctly.
5. Install Node.js versions:
Use NVM to install different Node.js versions: Bash
nvm install <version>(e.g.,
nvm install 18.12.1)
6. Use different Node.js versions:
Switch between installed versions: Bash
nvm use <version>Check the currently used version: Bash
nvm current
Additional notes:
Fish shell: If you prefer Fish shell, consider using
fisherto manage plugins, as NVM doesn't have native Fish support.PATH variable: Ensure the path to NVM's bin directory is included in your PATH environment variable.
Troubleshooting: If you encounter issues, refer to the NVM documentation (https://github.com/nvm-sh/nvm) for further guidance.
Tags
- #nodejs
- #nvm
- #archlinux
- #garuda-linux