To install NVM (Node Version Manager) on CentOS Stream 10, follow these simple steps to manage multiple Node.js versions efficiently.
Step 1 : Start by updating your system packages to ensure you have the latest updates:
Step 2 : Download the NVM installation script from the official repository. Check for the latest version at https://github.com/nvm-sh/nvm. Run the following command to download and execute the script:
Step 3 : To apply the changes made by the NVM installation, source your shell configuration file:
Step 4 : Check if NVM has been installed successfully by running:
Step 5 : Basic Usage of NVM
Here are some common NVM commands to get you started:
- Install a Node.js version:
- Use a specific Node.js version:
- Set a default Node.js version:
- List all installed Node.js versions:
Step 6 : Check the current Node.js version:
Congratulations! You have successfully installed NVM on CentOS Stream 10.