{"id":15770,"date":"2024-06-26T19:33:43","date_gmt":"2024-06-26T16:03:43","guid":{"rendered":"https:\/\/www.itpiran.net\/blog\/?p=15770"},"modified":"2024-06-26T19:33:43","modified_gmt":"2024-06-26T16:03:43","slug":"how-to-install-node-js-on-ubuntu-20-04","status":"publish","type":"post","link":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/","title":{"rendered":"How to install Node.js on Ubuntu 20.04"},"content":{"rendered":"<h2 id=\"%d9%85%d9%82%d8%af%d9%85%d9%87\">Introduction<\/h2>\n<p>Node.js is a JavaScript runtime for server-side programming. It allows developers to create scalable backend functionality using JavaScript, a language that many are familiar with from browser-based web development.<\/p>\n<p>In this guide, we will show you three different ways to install Node.js on Ubuntu 20.04 server:<\/p>\n<ul>\n<li>Using apt to install the nodejs package from Ubuntu&#039;s default software repository<\/li>\n<li>Using apt with an alternative PPA software repository to install specific versions of the nodejs package<\/li>\n<li>Install nvm, the Node Version Manager, and use it to install and manage multiple versions of Node.js<\/li>\n<\/ul>\n<p>For many users, using apt with the default repository will be sufficient. If you need newer or older versions of Node, you should use a PPA repository. If you are actively developing Node applications and need to switch between Node versions, choose the nvm method.<\/p>\n<h5 id=\"%d8%aa%d9%88%d8%ac%d9%87-%d8%af%d8%a7%d8%b4%d8%aa%d9%87-%d8%a8%d8%a7%d8%b4%db%8c%d8%af\">Note<\/h5>\n<p>This article will guide you through installing Node.js on an Ubuntu server. If you want a one-click way to deploy a Node application to a live server, take a look at the DigitalOcean application platform.<\/p>\n<h5 id=\"%d9%be%db%8c%d8%b4-%d9%86%db%8c%d8%a7%d8%b2%d9%87%d8%a7\">Prerequisites<\/h5>\n<p>To follow this guide, you will need to set up an Ubuntu 20.04 server. Before you begin, you will need to set up a non-root user account with sudo privileges on your system. You can learn how to do this by following our tutorial on setting up an initial Ubuntu 20.04 server.<\/p>\n<h2 id=\"%da%af%d8%b2%db%8c%d9%86%d9%87-1-%d9%86%d8%b5%d8%a8-node-js-%d8%a8%d8%a7-apt-%d8%a7%d8%b2-%d9%85%d8%ae%d8%a7%d8%b2%d9%86-%d9%be%db%8c%d8%b4-%d9%81%d8%b1%d8%b6\">Option 1 \u2013 Install Node.js with Apt from the default repositories<\/h2>\n<p>Ubuntu 20.04 includes a version of Node.js in its default repositories that can be used to provide a consistent experience across multiple systems. At the time of writing, the version available in the repositories is 10.19. This won&#039;t be the latest version, but it should be stable and sufficient for quick language testing.<\/p>\n<p>You can use the apt package manager to get this version. First, refresh your local package list:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt update<\/code><\/pre>\n<\/div>\n<p>Then install Node.js:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install nodejs<\/code><\/pre>\n<\/div>\n<p>Verify that the installation was successful by querying for its version number:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>node -v<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nv10.19.0<\/code><\/pre>\n<\/div>\n<p>If the package in the repositories meets your needs, that&#039;s all you need to do to get Node.js up and running. In most cases, you&#039;ll also want to install npm, the Node.js package manager. You can do this by installing the npm package with apt:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install npm<\/code><\/pre>\n<\/div>\n<p>This allows you to install modules and packages for use with Node.js.<\/p>\n<p>At this point, you have successfully installed Node.js and npm using apt and the default Ubuntu software repositories. The next section shows how to use an alternative repository to install different versions of Node.js.<\/p>\n<h2 id=\"%da%af%d8%b2%db%8c%d9%86%d9%87-2-%d9%86%d8%b5%d8%a8-node-js-%d8%a8%d8%a7-apt-%d8%a8%d8%a7-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-nodesource-ppa\">Option 2 \u2013 Install Node.js with Apt using NodeSource PPA<\/h2>\n<p>To install a different version of Node.js, you can use the PPA (Personal Package Archive) maintained by NodeSource. These PPAs contain more versions of Node.js than the official Ubuntu repositories. Node.js v16 and v18 are available as of this writing.<\/p>\n<p>First, install the PPA to access its packages. From your home directory, use curl to retrieve the installation script for your preferred version, making sure to replace 16.x with your preferred version string (if different):<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>cd ~\r\ncurl -sL https:\/\/deb.nodesource.com\/setup_16.x -o \/tmp\/nodesource_setup.sh<\/code><\/pre>\n<\/div>\n<p>See the NodeSource documentation for more information about available versions.<\/p>\n<p>Check the contents of the downloaded script with nano or your favorite text editor:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nano \/tmp\/nodesource_setup.sh<\/code><\/pre>\n<\/div>\n<p>When you are sure the script is ready to run, exit your editor. Then run the script with sudo:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo bash \/tmp\/nodesource_setup.sh<\/code><\/pre>\n<\/div>\n<p>The PPA will be added to your configuration and your local package cache will be automatically updated. You can now install the Node.js package in the same way you did in the previous section:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt install nodejs<\/code><\/pre>\n<\/div>\n<p>Verify that you have the new version installed by running Node with the -v version flag:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>node -v<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nv16.19.0<\/code><\/pre>\n<\/div>\n<p>The NodeSource nodejs package includes both the node binary and npm, so you don&#039;t need to install npm separately.<\/p>\n<p>At this point, you have successfully installed Node.js and npm using apt and the NodeSource PPA. The next section shows how to use Node Version Manager to install and manage multiple versions of Node.js.<\/p>\n<h2 id=\"%da%af%d8%b2%db%8c%d9%86%d9%87-3-%d9%86%d8%b5%d8%a8-node-%d8%a8%d8%a7-%d8%a7%d8%b3%d8%aa%d9%81%d8%a7%d8%af%d9%87-%d8%a7%d8%b2-node-version-manager\">Option 3 \u2013 Install Node using Node Version Manager<\/h2>\n<p>Another way to install Node.js that is flexible is to use nvm, the Node Version Manager. This piece of software allows you to install and maintain many different independent versions of Node.js and their associated Node packages simultaneously.<\/p>\n<p>To install NVM on your Ubuntu 20.04 machine, visit the project&#039;s GitHub page. Copy the curl command from the README file displayed on the home page. This will give you the latest version of the installation script.<\/p>\n<p>Before passing the command to bash, it&#039;s always a good idea to check the script to make sure it doesn&#039;t do anything you don&#039;t agree with. You can do this by removing the | bash part at the end of the curl command:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.3\/install.sh<\/code><\/pre>\n<\/div>\n<p>Review the script and make sure you are comfortable with the changes it makes. When you are satisfied, run the command again with | bash added at the end. The URL you use will change depending on the latest version of nvm, but as of now, the script can be downloaded and run with:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>curl -o- https:\/\/raw.githubusercontent.com\/nvm-sh\/nvm\/v0.39.3\/install.sh | bash<\/code><\/pre>\n<\/div>\n<p>This will install the nvm script into your user account. To use it, you must first source your bashrc file:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>source ~\/.bashrc<\/code><\/pre>\n<\/div>\n<p>Now you can ask NVM which Node version is available:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>nvm list-remote<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\n. . .\r\nv18.0.0\r\nv18.1.0\r\nv18.2.0\r\nv18.3.0\r\nv18.4.0\r\nv18.5.0\r\nv18.6.0\r\nv18.7.0\r\nv18.8.0\r\nv18.9.0\r\nv18.9.1\r\nv18.10.0\r\nv18.11.0\r\nv18.12.0 (LTS: Hydrogen)\r\nv18.12.1 (LTS: Hydrogen)\r\nv18.13.0 (Latest LTS: Hydrogen)\r\nv19.0.0\r\nv19.0.1\r\nv19.1.0\r\nv19.2.0\r\nv19.3.0\r\nv19.4.0<\/code><\/pre>\n<\/div>\n<p>This is a very long list. You can install a version of Node by typing in any of the released versions in the list. For example, to get v14.10.0, you could run:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nvm install v14.10.0<\/code><\/pre>\n<\/div>\n<p>You can see the different versions you have installed by listing them:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>nvm list\r\n<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\n-&gt; v14.10.0\r\nv14.21.2\r\ndefault -&gt; v14.10.0\r\niojs -&gt; N\/A (default)\r\nunstable -&gt; N\/A (default)\r\nnode -&gt; stable (-&gt; v14.21.2) (default)\r\nstable -&gt; 14.21 (-&gt; v14.21.2) (default)\r\n. . .<\/code><\/pre>\n<\/div>\n<p>This shows the currently active version on the first line (-&gt;v14.10.0) followed by some aliases and the versions that those aliases refer to.<\/p>\n<p>Additionally, there are aliases for different long-term support (or LTS) versions of Node:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nlts\/* -&gt; lts\/hydrogen (-&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.12 (-&gt; N\/A)\r\nlts\/fermium -&gt; v14.21.2\r\nlts\/gallium -&gt; v16.19.0 (-&gt; N\/A)\r\nlts\/hydrogen -&gt; v18.13.0 (-&gt; N\/A)<\/code><\/pre>\n<\/div>\n<p>You can also install a version based on these aliases. For example, to install the latest long-term support version, Hydrogen, run:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>nvm install lts\/hydrogen<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nDownloading and installing node v18.13.0...\r\n. . .\r\nNow using node v18.13.0 (npm v8.19.3)<\/code><\/pre>\n<\/div>\n<p>You can switch between installed versions using nvm:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>nvm use v14.10.0<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nNow using node v14.10.0 (npm v6.14.8)\r\n```\r\nYou can verify that the install was successful using the same technique from the other sections:\r\n```command\r\nnode -v<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nv14.10.0<\/code><\/pre>\n<\/div>\n<p>The correct version of Node is installed on your machine as expected. A compatible version of npm is also available.<\/p>\n<h2 id=\"%d8%ad%d8%b0%d9%81-node-js\">Uninstall Node.js<\/h2>\n<p>You can uninstall Node.js using apt or nvm remove, depending on how you installed it. To remove a version from the system repositories, use apt remove:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt remove nodejs<\/code><\/pre>\n<\/div>\n<p>By default, apt remove preserves local configuration files created since installation. If you don&#039;t want to save the configuration files for later use, use apt purge:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-bash\" data-lang=\"Bash\"><code>sudo apt purge nodejs<\/code><\/pre>\n<\/div>\n<p>To uninstall a version of Node.js that you installed using nvm, first determine whether it is the current active version:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>nvm current<\/code><\/pre>\n<\/div>\n<p>If the version you want is not the current active version, you can run:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>nvm uninstall node_version<\/code><\/pre>\n<\/div>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>Output\r\nUninstalled node node_version<\/code><\/pre>\n<\/div>\n<p>This command will remove the selected Node.js version.<\/p>\n<p>If the version you want to remove is the current active version, you must first disable nvm to enable your changes:<\/p>\n<div class=\"hcb_wrap\" data-no-translation=\"\" data-no-auto-translation=\"\">\n<pre class=\"prism line-numbers lang-plain\" data-lang=\"Plain Text\"><code>nvm deactivate<\/code><\/pre>\n<\/div>\n<p>You can now uninstall the current version using the uninstall command used earlier. This will remove all files associated with the targeted Node.js version.<\/p>\n<h2 id=\"%d9%86%d8%aa%db%8c%d8%ac%d9%87\">Result<\/h2>\n<p>There are many ways to get Node.js up and running on Ubuntu 20.04 Server. Your circumstances will determine which of the above methods is best for your needs. While using the version packaged in the Ubuntu repository is one way, using nvm or the NodeSource PPA offers more flexibility.<\/p>","protected":false},"excerpt":{"rendered":"Introduction Node.js is a JavaScript runtime for server-side programming. It allows developers to\u2026","protected":false},"author":1,"featured_media":15772,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_yoast_wpseo_focuskw":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04","_yoast_wpseo_title":"","_yoast_wpseo_metadesc":"","_yoast_wpseo_canonical":"","_yoast_wpseo_opengraph-description":"","_yoast_wpseo_opengraph-image":"","_yoast_wpseo_twitter-description":"","_yoast_wpseo_twitter-image":"","_yoast_wpseo_focuskeywords":"","_yoast_wpseo_primary_category":"193","footnotes":""},"categories":[193,363,369],"tags":[384,394,368],"class_list":{"0":"post-15770","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-tutorials","8":"category-programming","9":"category-os","10":"tag-java-script","11":"tag-nodejs","12":"tag-ubuntu"},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04 - \u0628\u0644\u0627\u06af ITPiran<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04 - \u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"og:description\" content=\"\u0645\u0642\u062f\u0645\u0647 Node.js \u06cc\u06a9 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0633\u0645\u062a \u0633\u0631\u0648\u0631 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0628\u0647 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0627\u062c\u0627\u0632\u0647&hellip;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/\" \/>\n<meta property=\"og:site_name\" content=\"\u0628\u0644\u0627\u06af ITPiran\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-26T16:03:43+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/cdn.itpiran.net\/2024\/06\/26193214\/node.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1793\" \/>\n\t<meta property=\"og:image:height\" content=\"1110\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\"},\"headline\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04\",\"datePublished\":\"2024-06-26T16:03:43+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/\"},\"wordCount\":160,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/26193214\\\/node.jpg\",\"keywords\":[\"Java Script\",\"Nodejs\",\"Ubuntu\"],\"articleSection\":[\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc\",\"\u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/\",\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04 - \u0628\u0644\u0627\u06af ITPiran\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/26193214\\\/node.jpg\",\"datePublished\":\"2024-06-26T16:03:43+00:00\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#primaryimage\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/26193214\\\/node.jpg\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2024\\\/06\\\/26193214\\\/node.jpg\",\"width\":1793,\"height\":1110},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/tutorials\\\/how-to-install-node-js-on-ubuntu-20-04\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"\u0622\u0645\u0648\u0632\u0634\u06cc\",\"item\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/category\\\/tutorials\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"name\":\"\u0628\u0644\u0627\u06af ITPiran\",\"description\":\"\u0627\u062e\u0628\u0627\u0631 \u0648 \u0645\u0642\u0627\u0644\u0627\u062a \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#organization\",\"name\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\",\"alternateName\":\"ITPIran Blog\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"contentUrl\":\"https:\\\/\\\/cdn.itpiran.net\\\/2023\\\/12\\\/27150508\\\/cropped-ITPIRAN-BLOG-LOGO-2.png\",\"width\":512,\"height\":512,\"caption\":\"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646\"},\"image\":{\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/#\\\/schema\\\/person\\\/04ed27b919baca468a2273f8e4318f81\",\"name\":\"admin\",\"url\":\"https:\\\/\\\/www.itpiran.net\\\/blog\\\/en\\\/author\\\/admin\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Install Node.js on Ubuntu 20.04 - ITPiran Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/","og_locale":"en_US","og_type":"article","og_title":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04 - \u0628\u0644\u0627\u06af ITPiran","og_description":"\u0645\u0642\u062f\u0645\u0647 Node.js \u06cc\u06a9 \u0632\u0645\u0627\u0646 \u0627\u062c\u0631\u0627 \u062c\u0627\u0648\u0627 \u0627\u0633\u06a9\u0631\u06cc\u067e\u062a \u0628\u0631\u0627\u06cc \u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc \u0633\u0645\u062a \u0633\u0631\u0648\u0631 \u0627\u0633\u062a. \u0627\u06cc\u0646 \u0628\u0647 \u062a\u0648\u0633\u0639\u0647 \u062f\u0647\u0646\u062f\u06af\u0627\u0646 \u0627\u062c\u0627\u0632\u0647&hellip;","og_url":"https:\/\/www.itpiran.net\/blog\/en\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/","og_site_name":"\u0628\u0644\u0627\u06af ITPiran","article_published_time":"2024-06-26T16:03:43+00:00","og_image":[{"width":1793,"height":1110,"url":"https:\/\/cdn.itpiran.net\/2024\/06\/26193214\/node.jpg","type":"image\/jpeg"}],"author":"admin","twitter_card":"summary_large_image","twitter_misc":{"Written by":"admin","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#article","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/"},"author":{"name":"admin","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81"},"headline":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04","datePublished":"2024-06-26T16:03:43+00:00","mainEntityOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/"},"wordCount":160,"commentCount":0,"publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/06\/26193214\/node.jpg","keywords":["Java Script","Nodejs","Ubuntu"],"articleSection":["\u0622\u0645\u0648\u0632\u0634\u06cc","\u0628\u0631\u0646\u0627\u0645\u0647 \u0646\u0648\u06cc\u0633\u06cc","\u0633\u06cc\u0633\u062a\u0645 \u0639\u0627\u0645\u0644"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/","url":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/","name":"How to Install Node.js on Ubuntu 20.04 - ITPiran Blog","isPartOf":{"@id":"https:\/\/www.itpiran.net\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#primaryimage"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#primaryimage"},"thumbnailUrl":"https:\/\/cdn.itpiran.net\/2024\/06\/26193214\/node.jpg","datePublished":"2024-06-26T16:03:43+00:00","breadcrumb":{"@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#primaryimage","url":"https:\/\/cdn.itpiran.net\/2024\/06\/26193214\/node.jpg","contentUrl":"https:\/\/cdn.itpiran.net\/2024\/06\/26193214\/node.jpg","width":1793,"height":1110},{"@type":"BreadcrumbList","@id":"https:\/\/www.itpiran.net\/blog\/tutorials\/how-to-install-node-js-on-ubuntu-20-04\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.itpiran.net\/blog\/"},{"@type":"ListItem","position":2,"name":"\u0622\u0645\u0648\u0632\u0634\u06cc","item":"https:\/\/www.itpiran.net\/blog\/category\/tutorials\/"},{"@type":"ListItem","position":3,"name":"\u0646\u062d\u0648\u0647 \u0646\u0635\u0628 Node.js \u062f\u0631 \u0627\u0648\u0628\u0648\u0646\u062a\u0648 20.04"}]},{"@type":"WebSite","@id":"https:\/\/www.itpiran.net\/blog\/#website","url":"https:\/\/www.itpiran.net\/blog\/","name":"ITPiran Blog","description":"Iranian Sustainable Trade News and Articles","publisher":{"@id":"https:\/\/www.itpiran.net\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.itpiran.net\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.itpiran.net\/blog\/#organization","name":"Sustainable Iranian Business Blog","alternateName":"ITPIran Blog","url":"https:\/\/www.itpiran.net\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","contentUrl":"https:\/\/cdn.itpiran.net\/2023\/12\/27150508\/cropped-ITPIRAN-BLOG-LOGO-2.png","width":512,"height":512,"caption":"\u0628\u0644\u0627\u06af \u062a\u062c\u0627\u0631\u062a \u067e\u0627\u06cc\u062f\u0627\u0631 \u0627\u06cc\u0631\u0627\u0646\u06cc\u0627\u0646"},"image":{"@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.itpiran.net\/blog\/#\/schema\/person\/04ed27b919baca468a2273f8e4318f81","name":"admin","url":"https:\/\/www.itpiran.net\/blog\/en\/author\/admin\/"}]}},"_links":{"self":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15770","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/comments?post=15770"}],"version-history":[{"count":1,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15770\/revisions"}],"predecessor-version":[{"id":15771,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/posts\/15770\/revisions\/15771"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media\/15772"}],"wp:attachment":[{"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/media?parent=15770"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/categories?post=15770"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.itpiran.net\/blog\/en\/wp-json\/wp\/v2\/tags?post=15770"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}