How to Install and Use NVM on Debian 11

 

 

NVM (Node Version Manager) is a tool that allows you to manage multiple versions of Node.js on a single machine. This guide will show you how to install and use NVM on Debian 11.

Step 1: Update Your System

Start by ensuring your system is up to date:

sudo apt update && sudo apt upgrade -y

Step 2: Install Required Packages

To install NVM, you'll need to have curl installed on your system. Install it using the following command:

sudo apt install curl -y

Step 3: Download and Install NVM

Download the NVM installation script using curl:

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

This command will download the installation script and execute it.

Step 4: Activate NVM

After installation, you need to activate NVM by adding the following lines to your profile script:

export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"

You can do this by running:

echo 'export NVM_DIR="$HOME/.nvm"' >> ~/.bashrc
echo '[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"' >> ~/.bashrc
source ~/.bashrc

Step 5: Verify NVM Installation

Check if NVM is installed correctly by running:

nvm --version

Step 6: Install Node.js Using NVM

Now you can install Node.js versions easily. For example, to install the latest version of Node.js, run:

nvm install node

You can also install a specific version, for example:

nvm install 14.17.0

Step 7: Use Node.js Version

To use a specific version of Node.js, you can run:

nvm use 14.17.0

You can check the currently active version of Node.js by running:

node -v

Conclusion

You have successfully installed and configured NVM on Debian 11. This tool will allow you to manage multiple versions of Node.js easily.

If you're looking for a reliable hosting solution for your Node.js applications, consider using Windows VPS UK. With Windows VPS, you can efficiently host your applications and ensure high performance. Whether you need VPS UK Windows or Windows Virtual Private Servers, you'll find a solution that fits your requirements.

For larger deployments or enterprise needs, explore Windows Virtual Dedicated Server Hosting or Virtual Private Server Hosting Windows. Whether you're located in the UK, Italy, or elsewhere, Windows VPS Italy and UK VPS Windows offer reliable hosting options. Visit Windows VPS Hosting UK to discover the best hosting solutions for your needs.

  • 0 A felhasználók hasznosnak találták ezt
Hasznosnak találta ezt a választ?

Kapcsolódó cikkek

Boost Your Ubuntu System's Performance with a Swap File: A Step-by-Step Guide

What is a Swap File? A swap file in Ubuntu serves as dedicated virtual memory on your hard...

How to Migrate ISPConfig 2, ISPConfig 3.x, Confixx, CPanel or Plesk to ISPConfig 3.2 (single server)

Introduction Migration from other control panels like ISPConfig 2, ISPConfig 3.x, Confixx,...

How to Install and Configure Zabbix Server and Client on Rocky Linux 9

Introduction Zabbix is an open-source monitoring solution that provides real-time...

How to Install CockroachDB Cluster on Debian 12

Introduction CockroachDB is a distributed SQL database built to handle large-scale,...

How to Install Joomla with Apache and Let's Encrypt SSL on AlmaLinux 9

Introduction Joomla is a popular open-source content management system (CMS) used to build...