To install NVM (Node Version Manager) offline on Linux, you can follow these steps:
- Download the installation script for NVM:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh > install.sh
- Transfer the install.sh script to the Linux machine where you want to install NVM.
- Open a terminal on the Linux machine and make the script executable:
chmod +x install.sh
- Run the script to install NVM:
This will create a .nvm directory in your home directory and modify your shell profile (~/.bashrc, ~/.zshrc, etc.) to load NVM.
- Restart your terminal or run the following command to load NVM into the current session:
- Verify that NVM is installed by running:
It should display the version of NVM installed on your system.
Now, you can use NVM to manage your Node.js versions offline. You can install and switch between different Node.js versions using NVM commands like
nvm install <version> and
nvm use <version>.