If you’re diving into Node.js development on Garuda Linux Dragonized KDE, this guide simplifies the process of setting up Node Version Manager (NVM). This straightforward tutorial will help you swiftly install NVM using curl, ensuring a hassle-free environment for managing your Node.js versions.
Step 1: Check Current Shell and Switch to Bash
Before proceeding with the Node Version Manager (NVM) installation, it’s essential to ensure that you are currently using the bash shell. In the terminal, type the following command to switch to the bash shell:
bash
This ensures that you are using the bash terminal for the subsequent steps in setting up Node Version Manager (NVM) on Garuda Linux Dragonized KDE.
Step 2: Install NVM with Curl
Use curl to download and run the NVM installation script:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Step 3: Resolve “Failed to connect” Error
If you encounter a connection error, update your /etc/hosts file:
1.Open the hosts file with nano:
sudo nano /etc/hosts
2.Add the IP address at the end:
185.199.108.133 raw.githubusercontent.com
3.Save and close (Ctrl + X, Y, Enter).
4.Retry the NVM installation command:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.1/install.sh | bash
Step 4: Complete NVM Installation
Close and reopen the terminal.Verify the installation after switching to bash shell.
bash
nvm --version
Conclusion
You’ve efficiently set up Node Version Manager on Garuda Linux, enabling seamless management of Node.js versions. Happy coding!
Top comments (0)