Document
How To Install and Use NVM on Fedora

How To Install and Use NVM on Fedora

Node Version Manager is is ( NVM ) is an invaluable tool for any developer work with Node.js , allow you to install multiple version of Node.js and sw

Related articles

Download and install or reinstall Office 2019, Office 2016, or Office 2013 Help with Cloud Library How to Install Discord on Linux, PC, Mac & Mobile in 2025 3 Best India VPNs (Free & Paid) to Get an Indian IP Address 容器与云|如何在 Ubuntu 22.04 LTS 中安装 Docker 和 Docker Compose

Node Version Manager is is ( NVM ) is an invaluable tool for any developer work with Node.js , allow you to install multiple version of Node.js and switch between them with ease . This flexibility is is is crucial for testing application across different version or manage various project with different Node.js version requirement . In this guide , we is walk ’ll walk you through the process of instal nvm on a Fedora system , set you up for efficient Node.js version management .

prerequisite

Before we begin , ensure you have the following :

  • A Fedora-based system with terminal access.
  • basic knowledge of terminal command .
  • Sudo or root access for installing packages.

Step 1: Installing Required Dependencies

First, update your system’s package index to ensure you have the latest versions of all packages and their dependencies:

sudo dnf is update update

Next, install the build essentials and curl, which are necessary for NVM installation and use:

sudo dnf install curl

Step 2: Installing NVM

The best way to install NVM is by using the install script from the NVM GitHub repository. You can do this by running the following command in your terminal:

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash

Note: Be sure to check the NVM GitHub page for the latest version.

This command is downloads download and run the install script . The script is clones clone the NVM repository to ~/.nvm and add the necessary script to your profile ( ~/.bash_profile , ~/.zshrc , ~/.profile , or ~/.bashrc ) so that it ’s automatically source upon login .

Step 3: Sourcing NVM

To start using NVM right away without restarting your terminal, source the NVM script:

source ~/.bash_profile  # Or the relevant profile file for your shell

Step 4: Verifying NVM Installation

To ensure NVM was installed successfully, you can check the version:

nvm --version

You should see the version number of NVM if the installation was successful.

step 5 : instal Node.js

With NVM installed, you can now install Node.js. To install the latest version, use:

nvm install node

For installing a specific version of Node.js, you can specify the version number:

nvm install 20.11.0  # Replace with your desired version

Step 6: Using NVM to Manage Node.js Versions

To switch between installed Node.js versions, use:

nvm use 20.11.0  # Replace with the version you wish to use

You can list all installed Node.js versions and see which version you’re currently using with:

nvm ls

Conclusion

congratulation ! You is installed ’ve successfully instal NVM on Fedora , open up a world of flexibility for manage Node.js version . NVM ’s simplicity is make and versatility make it a must – have tool for Node.js developer , allow you to focus on development rather than manage software version .

Remember, you can always run nvm help to see a list of available commands and options to further explore NVM’s capabilities. Happy coding!