{"id":2755,"date":"2025-04-25T09:41:56","date_gmt":"2024-04-21T14:38:26","guid":{"rendered":""},"modified":"2025-02-02T00:46:19","modified_gmt":"2025-02-01T23:46:19","slug":"how-to-install-and-use-nvm-node-version-manager-on-ubuntu-22-04","status":"publish","type":"post","link":"https:\/\/netcloud24.com\/knowledgebase\/how-to-install-and-use-nvm-node-version-manager-on-ubuntu-22-04\/","title":{"rendered":"Linux VPS &#038; VPS Windows Setup Guide | NetCloud24 and Use NVM (Node Version Manager) on Ubuntu 22.04"},"content":{"rendered":"<p>\u00a0<\/p>\n<\/p>\n<header>\n<h1>\u00a0<\/h1>\n<\/header>\n<article>\n<p><strong>NVM (Node Version Manager)<\/strong> is a useful tool that allows you to easily install and manage multiple versions of Node.js on your system. This is especially helpful for developers working on different projects that require specific Node.js versions. In this guide, we will show you how to install and use NVM on <strong>Ubuntu 22.04<\/strong>. Using NVM on a  ensures that you can manage your Node.js environment efficiently with the dedicated resources of a <strong>VPS server<\/strong>.<\/p>\n<h2>Step 1: Update Your VPS Server<\/h2>\n<p>Before installing NVM, it\u2019s important to update your <a href=\"https:\/\/ie.netcloud24.com\">VPS server<\/a> to ensure all the packages are up to date. Run the following command:<\/p>\n<pre><code>sudo apt update &amp;&amp; sudo apt upgrade -y<\/code><\/pre>\n<p>Running NVM on a <strong>Windows VPS<\/strong> allows you to manage multiple Node.js versions smoothly, utilizing the power and flexibility of dedicated resources.<\/p>\n<h2>Step 2: Install NVM<\/h2>\n<p>To install NVM, use the installation script provided by the NVM repository. You can do this by running the following command:<\/p>\n<pre><code>curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.1\/install.sh | bash<\/code><\/pre>\n<p>This command downloads and runs the NVM installation script, which sets up NVM in your system\u2019s environment.<\/p>\n<h2>Step 3: Load NVM<\/h2>\n<p>After installing NVM, you need to load it into your current shell session. You can do this by running the following command:<\/p>\n<pre><code>source ~\/.bashrc<\/code><\/pre>\n<p>To verify that NVM is correctly installed, run the following command:<\/p>\n<pre><code>nvm --version<\/code><\/pre>\n<p>This will display the version of NVM installed, confirming that it\u2019s ready to use.<\/p>\n<h2>Step 4: Install Node.js Using NVM<\/h2>\n<p>Now that NVM is installed, you can easily install different versions of Node.js. To install the latest version of Node.js, run:<\/p>\n<pre><code>nvm install node<\/code><\/pre>\n<p>This will install the latest stable version of Node.js. If you want to install a specific version, you can specify the version number. For example, to install Node.js version 14, run:<\/p>\n<pre><code>nvm install 14<\/code><\/pre>\n<h2>Step 5: List Installed Node.js Versions<\/h2>\n<p>Once you have multiple versions of Node.js installed, you can list all the installed versions by running:<\/p>\n<pre><code>nvm ls<\/code><\/pre>\n<p>This command will display all the Node.js versions currently installed on your system.<\/p>\n<h2>Step 6: Switch Between Node.js Versions<\/h2>\n<p>One of the great features of NVM is the ability to switch between different Node.js versions. To switch to a specific version, run the following command:<\/p>\n<pre><code>nvm use 14<\/code><\/pre>\n<p>This will switch your Node.js environment to version 14. To verify which version is currently active, run:<\/p>\n<pre><code>node -v<\/code><\/pre>\n<p>This will show the current active version of Node.js in your terminal.<\/p>\n<h2>Step 7: Set Default Node.js Version<\/h2>\n<p>You can also set a default version of Node.js to be used in every new shell session. To set a specific version as the default, run the following command:<\/p>\n<pre><code>nvm alias default 14<\/code><\/pre>\n<p>Now, every time you open a new terminal session, Node.js version 14 will be used as the default.<\/p>\n<h2>Step 8: Remove a Node.js Version<\/h2>\n<p>If you no longer need a specific version of Node.js, you can remove it using the following command:<\/p>\n<pre><code>nvm uninstall 14<\/code><\/pre>\n<p>This will remove Node.js version 14 from your system.<\/p>\n<h2>Step 9: Optimize Your VPS Server for Node.js<\/h2>\n<p>Hosting your Node.js applications on a  ensures that you benefit from dedicated CPU, memory, and storage resources. A <strong>VPS server<\/strong> allows you to manage Node.js environments more efficiently, especially when working with resource-intensive applications or managing multiple projects with different Node.js versions. VPS solutions provide scalability, enabling you to grow your server\u2019s resources as your applications expand.<\/p>\n<h2>Conclusion<\/h2>\n<p>By following this guide, you have successfully installed and configured NVM on Ubuntu 22.04. NVM makes it easy to manage multiple versions of Node.js, which is essential for many developers. Hosting your Node.js environment on a  ensures better performance, scalability, and control, especially for projects requiring various Node.js versions.<\/p>\n<p>For more information about VPS hosting and optimizing your Node.js setup, visit  today.<\/p>\n<\/article>\n<footer>\n<p>\u00a9 2024 Windows VPS &#8211; All Rights Reserved<\/p>\n<\/footer>\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>\u00a0 \u00a0 NVM (Node Version Manager) is a useful tool that allows you to easily install and manage multiple versions of Node.js on your system. This is especially\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-2755","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\/2755","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=2755"}],"version-history":[{"count":0,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/posts\/2755\/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=2755"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/categories?post=2755"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/netcloud24.com\/knowledgebase\/wp-json\/wp\/v2\/tags?post=2755"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}