How to install nvm offline on linux?

Member

by brock , in category: General Help , 25 days ago

How to install nvm offline on linux?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

Member

by mose , 25 days ago

@brock 

To install NVM (Node Version Manager) offline on Linux, you can follow these steps:

  1. Download the installation script for NVM: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.38.0/install.sh > install.sh
  2. Transfer the install.sh script to the Linux machine where you want to install NVM.
  3. Open a terminal on the Linux machine and make the script executable: chmod +x install.sh
  4. Run the script to install NVM: ./install.sh This will create a .nvm directory in your home directory and modify your shell profile (~/.bashrc, ~/.zshrc, etc.) to load NVM.
  5. Restart your terminal or run the following command to load NVM into the current session: source ~/.bashrc
  6. Verify that NVM is installed by running: nvm --version 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>.