{"id":32,"date":"2025-05-19T16:22:17","date_gmt":"2024-02-11T02:41:12","guid":{"rendered":""},"modified":"2025-02-02T00:46:14","modified_gmt":"2025-02-01T23:46:14","slug":"how-to-install-and-use-nvm-on-debian-linux","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-and-use-nvm-on-debian-linux\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 and Use NVM on Debian Linux"},"content":{"rendered":"<article>\n<h1>How to Install and Use NVM on Debian 11<\/h1>\n<div class=\"contributeEdit\" style=\"float: right; width: 450px; max-width: 100%;\">\n<div id=\"tocContainer\">\n<h3>On this page<\/h3>\n<ol class=\"toc\">\n<li><a href=\"#prerequisites\">Prerequisites<\/a><\/li>\n<li><a href=\"#install-nvm\">Install NVM<\/a><\/li>\n<li><a href=\"#install-nodejs-with-nvm\">Install Node.js with NVM<\/a><\/li>\n<li><a href=\"#use-nvm-to-manage-nodejs-versions\">Use NVM to Manage Node.js Versions<\/a><\/li>\n<li><a href=\"#conclusion\">Conclusion<\/a><\/li>\n<\/ol>\n<\/div>\n<\/div>\n<p style=\"text-align: justify;\">NVM is a version manager for Node.js used to install and manage multiple Node.js versions in Linux. It is a command-line utility and provides several options for the easy installation of Node.js. It allows you to download and install any version of Node locally with a simple command.<span id=\"ezoic-pub-ad-placeholder-106\" class=\"ezoic-adpicker-ad\"><\/span><span id=\"div-gpt-ad-howtoforge_com-box-3-0\" class=\"ezoic-ad\" style=\"position: relative; z-index: 0; display: inline-block; padding: 0; min-height: 90px; min-width: 728px;\"><\/span><\/p>\n<p>In this post, we will show you how to install and use NVM to manage Node.js on Debian 11.<span id=\"ezoic-pub-ad-placeholder-121\" class=\"ezoic-adpicker-ad\"><\/span><span id=\"div-gpt-ad-howtoforge_com-medrectangle-3-0\" class=\"ezoic-ad\" style=\"position: relative; z-index: 0; display: inline-block; padding: 0; min-height: 90px; min-width: 728px;\"><\/span><\/p>\n<div style=\"width: 336px; float: left; margin: 10px 15px 10px 0; background-color: #fff;\">\u00a0<\/div>\n<h2 id=\"prerequisites\">Prerequisites<\/h2>\n<ul>\n<li>A server running Debian 11.<\/li>\n<li>A root password is configured on the server.<\/li>\n<\/ul>\n<h2 id=\"install-nvm\">Install NVM<\/h2>\n<p>The installation of NVM is a very straightforward process. You can simply install it using the CURL command. First, install the CURL and Gnupg2 with the following command:<\/p>\n<pre class=\"command\">apt-get install curl gnupg2 -y<\/pre>\n<p>Next, run the following command to download and run the NVM installation script:<\/p>\n<pre class=\"command\">curl https:\/\/raw.githubusercontent.com\/creationix\/nvm\/master\/install.sh | bash<\/pre>\n<p>The above command will install NVM and makes all the required environment settings in the <strong>.bashrc<\/strong> file.<span id=\"ezoic-pub-ad-placeholder-130\" class=\"ezoic-adpicker-ad\"><\/span><\/p>\n<div id=\"howtoforge_com-link-h-large-1\" class=\"ezo_link_unit_a\">\u00a0<\/div>\n<p>\u00a0 Now, activate all settings using the following command:<\/p>\n<pre class=\"command\">source ~\/.bashrc<\/pre>\n<p>Now, verify the NVM version using the following command:<\/p>\n<pre class=\"command\">nvm --version<\/pre>\n<p>You should see the following output:<\/p>\n<pre>0.38.0\r\n<\/pre>\n<h2 id=\"install-nodejs-with-nvm\">Install Node.js with NVM<\/h2>\n<p>At this point, NVM is installed in your system. You can now install any Node.js version to your system.<span id=\"ezoic-pub-ad-placeholder-108\" class=\"ezoic-adpicker-ad\"><\/span><span id=\"div-gpt-ad-howtoforge_com-medrectangle-4-0\" class=\"ezoic-ad\" style=\"position: relative; z-index: 0; display: inline-block; padding: 0; width: 100%; max-width: 1200px; margin-left: auto!important; margin-right: auto!important; min-height: 400px; min-width: 580px;\"><\/span> To install the latest version of Node.js, run the following command:<\/p>\n<pre class=\"command\">nvm install node<\/pre>\n<p>You should see the following output:<\/p>\n<pre>Downloading and installing node v16.9.0...\r\nDownloading https:\/\/nodejs.org\/dist\/v16.9.0\/node-v16.9.0-linux-x64.tar.xz...\r\n######################################################################################################################################## 100.0%\r\nComputing checksum with sha256sum\r\nChecksums matched!\r\nNow using node v16.9.0 (npm v7.21.1)\r\nCreating default alias: default -&gt; node (-&gt; v16.9.0)\r\n<\/pre>\n<p>To verify the installed version of Node.js, run the following command:<\/p>\n<pre class=\"command\">node --version<\/pre>\n<p>You should see the following output:<\/p>\n<pre>v16.9.0\r\n<\/pre>\n<p>If you want to install the latest stable version of Node.js run the following command:<span id=\"ezoic-pub-ad-placeholder-110\" class=\"ezoic-adpicker-ad\"><\/span><span id=\"div-gpt-ad-howtoforge_com-box-4-0\" class=\"ezoic-ad\" style=\"position: relative; z-index: 0; display: inline-block; padding: 0; width: 100%; max-width: 1200px; margin-left: auto!important; margin-right: auto!important; min-height: 90px; min-width: 728px;\"><\/span><\/p>\n<pre class=\"command\">nvm install node --lts<\/pre>\n<p>You should see the following output:<\/p>\n<pre>v16.9.0 is already installed.\r\nNow using node v16.9.0 (npm v7.21.1)\r\n<\/pre>\n<p>To install the specific Node.js version (12.17.0), run the following command:<\/p>\n<pre class=\"command\">nvm install 12.17.0<\/pre>\n<p>You should see the following output:<\/p>\n<pre>Downloading and installing node v12.17.0...\r\nDownloading https:\/\/nodejs.org\/dist\/v12.17.0\/node-v12.17.0-linux-x64.tar.xz...\r\n######################################################################################################################################## 100.0%\r\nComputing checksum with sha256sum\r\nChecksums matched!\r\nNow using node v12.17.0 (npm v6.14.4)\r\n<\/pre>\n<p>Now, verify the current Node.js version using the following command:<\/p>\n<pre class=\"command\">node --version<\/pre>\n<p>You should see the following output:<span id=\"ezoic-pub-ad-placeholder-111\" class=\"ezoic-adpicker-ad\"><\/span><\/p>\n<pre>v12.17.0\r\n<\/pre>\n<h2 id=\"use-nvm-to-manage-nodejs-versions\">Use NVM to Manage Node.js Versions<\/h2>\n<p>To list all installed Node.js versions in your system, run the following command:<\/p>\n<pre class=\"command\">nvm ls<\/pre>\n<p>You should see the following output:<\/p>\n<pre>-&gt;     v12.17.0\r\n        v16.9.0\r\ndefault -&gt; node (-&gt; v16.9.0)\r\niojs -&gt; N\/A (default)\r\nunstable -&gt; N\/A (default)\r\nnode -&gt; stable (-&gt; v16.9.0) (default)\r\nstable -&gt; 16.9 (-&gt; v16.9.0) (default)\r\nlts\/* -&gt; lts\/fermium (-&gt; N\/A)\r\nlts\/argon -&gt; v4.9.1 (-&gt; N\/A)\r\nlts\/boron -&gt; v6.17.1 (-&gt; N\/A)\r\nlts\/carbon -&gt; v8.17.0 (-&gt; N\/A)\r\nlts\/dubnium -&gt; v10.24.1 (-&gt; N\/A)\r\nlts\/erbium -&gt; v12.22.6 (-&gt; N\/A)\r\nlts\/fermium -&gt; v14.17.6 (-&gt; N\/A)\r\n<\/pre>\n<p>You can find the all available Node.js versions using the following command:<\/p>\n<pre class=\"command\">nvm ls-remote<\/pre>\n<p>To set your default Node.js version to 12.17.0, run the following command:<\/p>\n<pre class=\"command\">nvm use 12.17.0<\/pre>\n<p>You should see the following output:<span id=\"ezoic-pub-ad-placeholder-112\" class=\"ezoic-adpicker-ad\"><\/span>Now using node v12.17.0 (npm v6.14.4) To find the default version for the current user, run the following command:<\/p>\n<pre class=\"command\">nvm run default --version<\/pre>\n<p>You should see the following output:<\/p>\n<pre>Running node v16.9.0 (npm v7.21.1)\r\nv16.9.0\r\n<\/pre>\n<p>You can also run a Node application with a specific Node.js version using the following command:<\/p>\n<pre class=\"command\">nvm run v12.17.0 app.js<\/pre>\n<p>To remove a specific Node.js version from your system, run the following command:<\/p>\n<pre class=\"command\">nvm uninstall v12.17.0<\/pre>\n<h2 id=\"conclusion\">Conclusion<\/h2>\n<p>In this post, we explained how to install NVM to install Node.js on Debian 11. We also explained how to switch between multiple Node.js versions using NVM. I hope you can now run your application with any Node.js versions.<\/article>\n<article><\/article>\n<article><a href=\"https:\/\/netcloud24.com?language=english&amp;currency=4\">VPS Windows VPSServer<\/a><\/article>\n<p><a href=\"https:\/\/de.netcloud24.com\/\" target=\"_blank\">Windows VPS Deutschland<\/a><\/p>\n<p><a href=\"https:\/\/es.netcloud24.com\/\" target=\"_blank\">Windows VPS Espa\u00f1a<\/a><\/p>\n<p><a href=\"https:\/\/nl.netcloud24.com\/\" target=\"_blank\">Windows VPS Nederland<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">Windows VPS Italia<\/a><\/p>\n<p><a href=\"https:\/\/pt.netcloud24.com\/\" target=\"_blank\">Windows VPS Portugal<\/a><\/p>\n<p><a href=\"https:\/\/it.netcloud24.com\/\" target=\"_blank\">VPS Windows Italia<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Sverige<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS Norge<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS T\u00fcrkiye<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows RDS (Remote Desktop Services)<\/a><\/p>\n<p><a href=\"https:\/\/ie.netcloud24.com\" target=\"_blank\">Windows VPS<\/a><\/p>\n<div class=\"post-author-box\" style=\"border-top:1px solid #ddd;margin-top:20px;padding-top:15px;\">\n<p><strong>Author:<\/strong> \u0141ukasz Bodziony<\/p>\n<p><strong>Website:<\/strong> <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a><\/p>\n<p><em>\u0141ukasz Bodziony is the CEO and founder of <a href=\"https:\/\/netcloud24.com\" target=\"_blank\" rel=\"dofollow\">NETCLOUD24<\/a>, a global VPS hosting brand proudly originating from Poland. With extensive experience in cloud computing, virtualization, and server management, he delivers high-performance <strong>Windows VPS<\/strong> and <strong>Remote Desktop Services (RDS)<\/strong> solutions to clients across Europe, North America, and beyond.<\/em><\/p>\n<p><em>His expertise covers a wide range of technologies, including <strong>Microsoft Azure<\/strong>, <strong>Proxmox VE<\/strong>, <strong>Amazon Web Services (AWS)<\/strong>, and numerous other virtualization and cloud platforms.<\/em><\/p>\n<p><em>Beyond running his hosting business, \u0141ukasz also provides <strong>professional paid server configuration and optimization services<\/strong> for companies and individuals. Outside of work, he is dedicated to caring for his children and building a secure future for them.<\/em><\/p>\n<p><em>If you are interested in working with him or need expert assistance with your hosting, cloud environment, or server setup, feel free to reach out via <a href=\"https:\/\/ca.netcloud24.com\" target=\"_blank\" rel=\"dofollow\">Windows VPS<\/a>.<\/em><\/p>\n<\/p><\/div>\n","protected":false},"excerpt":{"rendered":"<p>How to Install and Use NVM on Debian 11 On this page Prerequisites Install NVM Install Node.js with NVM Use NVM to Manage Node.js Versions Conclusion NVM is\u2026<\/p>\n","protected":false},"author":1,"featured_media":3421,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_robots_primary_cat":"","_seopress_titles_title":"","_seopress_titles_desc":"","_seopress_robots_index":"","footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[],"tags":[14,12,11,23,20,21,22,17,7,8,6,10,18,19,15,24,16,5,13,9],"class_list":["post-32","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","tag-cheapvps","tag-cloudvps","tag-hostingvps","tag-rds","tag-rdscal","tag-remotedesktop","tag-remotedesktopvps","tag-servervps","tag-ukvps","tag-virtualserver","tag-vpshosting","tag-vpsserver","tag-vpssolutions","tag-vpswindows","tag-vpswithwindows","tag-windowsrds","tag-windowsserver","tag-windowsvps","tag-windowsvpshosting","tag-windowsvpsuk"],"jetpack_publicize_connections":[],"_links":{"self":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/32","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/comments?post=32"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/32\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media\/3421"}],"wp:attachment":[{"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/media?parent=32"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=32"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=32"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}