{"id":2610,"date":"2026-04-04T14:57:33","date_gmt":"2026-04-04T09:27:33","guid":{"rendered":"https:\/\/mukundasoftware.com\/blog\/?p=2610"},"modified":"2026-04-04T14:58:15","modified_gmt":"2026-04-04T09:28:15","slug":"install-nodejs-beginners-guide-windows-mac-linux","status":"publish","type":"post","link":"https:\/\/mukundasoftware.com\/blog\/software\/how-to\/install-nodejs-beginners-guide-windows-mac-linux.html","title":{"rendered":"How to Install Node.js: A First-Timer\u2019s Complete Guide"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">If you are completely new to web development or just want to run JavaScript on your computer, Node.js is the tool you need. This guide walks you through installing Node.js for the very first time, explains a few essential commands, and helps you verify that everything works correctly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What is Node.js?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js is a runtime environment that lets you execute JavaScript code outside of a web browser. With Node.js you can build back\u2011end services, command\u2011line tools, or even desktop applications. It uses an event\u2011driven, non\u2011blocking model, making it fast and efficient.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 1:<\/strong> Choose the Right Version<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Node.js offers two main release lines:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>LTS (Long\u2011Term Support)<\/strong> \u2013 recommended for most beginners and production use. It is stable and receives security updates for a long time.<\/li>\n\n\n\n<li><strong>Current<\/strong> \u2013 includes the latest features but changes more often.<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For a first\u2011time installation, always choose the LTS version.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 2:<\/strong> Install Node.js on Your Operating System<\/h3>\n\n\n\n<h4 class=\"wp-block-heading\">1. Windows<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">Before installing, ensure your PC meets the <a href=\"https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/windows-11-system-minimum-requirements-cpu-tpm-guide.html\"><strong>Windows 11 System Minimum Requirements<\/strong><\/a> to avoid performance issues.<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Go to the official Node.js website: <code><a href=\"https:\/\/nodejs.org\" target=\"_blank\" rel=\"noreferrer noopener nofollow\"><strong>https:\/\/nodejs.org<\/strong><\/a><\/code><\/li>\n\n\n\n<li>Click the <strong>LTS<\/strong> download button. This will give you a <code>.msi<\/code> installer.<\/li>\n\n\n\n<li>Run the downloaded file and follow the setup wizard.<\/li>\n\n\n\n<li>Make sure to check the option <strong>\u201cAutomatically install the necessary tools\u201d<\/strong> (this also installs npm and adds Node.js to your system PATH).<\/li>\n\n\n\n<li>After the installation finishes, restart your computer (or at least restart your terminal).<\/li>\n<\/ol>\n\n\n\n<h4 class=\"wp-block-heading\">2. macOS<\/h4>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Using the official installer<\/strong><br>Download the <code>.pkg<\/code> file from the Node.js website (LTS version) and run it. Follow the on\u2011screen instructions.<\/li>\n\n\n\n<li><strong>Using Homebrew (recommended for developers)<\/strong><br>If you have Homebrew installed, open Terminal and run: <code>brew install node@20<\/code><br>Replace <code>20<\/code> with the current LTS major version. Then run <code>brew link node@20<\/code>.<\/li>\n<\/ul>\n\n\n\n<h4 class=\"wp-block-heading\">3. Linux (Ubuntu \/ Debian)<\/h4>\n\n\n\n<p class=\"wp-block-paragraph\">If you are setting up a fresh environment, check the <a href=\"https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/ubuntu-24-04-system-requirements.html\"><strong>Ubuntu 24.04 System Requirements<\/strong><\/a> to ensure compatibility.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Open a terminal and run the following commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># Update package index\nsudo apt update\n\n# Install Node.js from the official Ubuntu repository (may be an older version)\nsudo apt install nodejs npm\n\n# For the latest LTS version, use NodeSource\ncurl -fsSL https:\/\/deb.nodesource.com\/setup_20.x | sudo -E bash -\nsudo apt install -y nodejs\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Note:<\/strong> Replace <code>20<\/code> with the latest LTS version number found on the official Node.js site (for example, <code>22<\/code> or <code>24<\/code>). The script automatically adds the correct repository. After that, Node.js and npm are ready.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 3:<\/strong> Verify the Installation<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">No matter which operating system you use, open a terminal (Command Prompt on Windows, Terminal on macOS\/Linux) and type these two commands:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node --version\nnpm --version\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You should see version numbers printed, for example:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>v20.18.0\n10.8.2\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you see the versions, Node.js and npm (Node Package Manager) are installed correctly.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\"><strong>Step 4:<\/strong> Run Your First Node.js Command<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Create a simple \u201cHello World\u201d to make sure everything works. In your terminal, type:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>node -e \"console.log('Node.js is working!')\"<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">You will see the message <code>Node.js is working!<\/code> printed directly in the terminal.<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Essential Node.js Commands for Beginners<\/strong><\/h2>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><thead><tr><th>Command<\/th><th>What it does<\/th><\/tr><\/thead><tbody><tr><td><code>node --version<\/code> or <code>node -v<\/code><\/td><td>Shows the installed Node.js version.<\/td><\/tr><tr><td><code>npm --version<\/code> or <code>npm -v<\/code><\/td><td>Shows the installed npm version.<\/td><\/tr><tr><td><code>node<\/code><\/td><td>Opens the Node.js REPL (interactive environment). Type <code>.exit<\/code> to leave.<\/td><\/tr><tr><td><code>node filename.js<\/code><\/td><td>Runs a JavaScript file named <code>filename.js<\/code>.<\/td><\/tr><tr><td><code>npm init -y<\/code><\/td><td>Creates a <code>package.json<\/code> file with default values for a new project.<\/td><\/tr><tr><td><code>npm install &lt;package-name&gt;<\/code><\/td><td>Installs a package locally for your project.<\/td><\/tr><tr><td><code>npm install -g &lt;package-name&gt;<\/code><\/td><td>Installs a package globally (useful for tools like <code>nodemon<\/code> or <code>live-server<\/code>).<\/td><\/tr><tr><td><code>node -p \"process.versions\"<\/code><\/td><td>Displays detailed version information of Node.js and its dependencies.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>What\u2019s Next?<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">After installing Node.js, you can start building real projects. Learn how to use npm to install libraries, set up a local web server with the <code>http<\/code> module, or explore frameworks like Express.js.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choosing the right environment is key; see our guide on <a href=\"https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/comparing-the-best-os-for-programming-developers-and-coding.html\"><strong>Comparing the Best OS for Programming and Coding<\/strong><\/a> to see which platform fits your workflow.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\"><strong>Related Articles from Mukunda Software<\/strong><\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">You may find these guides helpful as you continue your development journey:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Ubuntu 24.04 System Requirements \u2013 Check if your Linux machine is ready<\/strong><br><a href=\"https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/ubuntu-24-04-system-requirements.html\">https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/ubuntu-24-04-system-requirements.html<\/a><\/li>\n\n\n\n<li><strong>Windows 11 System Minimum Requirements (CPU, TPM) \u2013 Make sure your PC is compatible<\/strong><br><a href=\"https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/windows-11-system-minimum-requirements-cpu-tpm-guide.html\">https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/windows-11-system-minimum-requirements-cpu-tpm-guide.html<\/a><\/li>\n\n\n\n<li><strong>Best Free Office Suites for Ubuntu \u2013 Productivity tools for your new development environment<\/strong><br><a href=\"https:\/\/mukundasoftware.com\/blog\/software\/best-free-office-suites-ubuntu.html\">https:\/\/mukundasoftware.com\/blog\/software\/best-free-office-suites-ubuntu.html<\/a><\/li>\n\n\n\n<li><strong>Comparing the Best OS for Programming, Developers and Coding \u2013 Choose the right operating system for your workflow<\/strong><br><a href=\"https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/comparing-the-best-os-for-programming-developers-and-coding.html\">https:\/\/mukundasoftware.com\/blog\/software\/operating-system\/comparing-the-best-os-for-programming-developers-and-coding.html<\/a><\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\"><em>Final Tip<\/em><\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Always keep Node.js updated. For LTS versions, visit the official website every few months or use a version manager like <code>nvm<\/code> (Node Version Manager) \u2013 especially useful if you work on multiple projects that need different Node.js versions.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>\ud83d\udca1 Visual suggestion:<\/strong> Screenshots of the Windows installer, the terminal output after <code>node --version<\/code>, and the Ubuntu terminal commands would make this guide even more beginner\u2011friendly.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now you are ready to run JavaScript anywhere. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are completely new to web development or just want to run JavaScript on your computer, Node.js is the tool you need. This guide walks you through installing Node.js for the very first time, explains a few essential commands, and helps you verify that everything works correctly. What is Node.js? Node.js is a runtime &#8230; <a title=\"How to Install Node.js: A First-Timer\u2019s Complete Guide\" class=\"read-more\" href=\"https:\/\/mukundasoftware.com\/blog\/software\/how-to\/install-nodejs-beginners-guide-windows-mac-linux.html\" aria-label=\"Read more about How to Install Node.js: A First-Timer\u2019s Complete Guide\">Read more<\/a><\/p>\n","protected":false},"author":3,"featured_media":2611,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[236],"tags":[],"class_list":["post-2610","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-how-to"],"_links":{"self":[{"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2610","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/comments?post=2610"}],"version-history":[{"count":1,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2610\/revisions"}],"predecessor-version":[{"id":2612,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/posts\/2610\/revisions\/2612"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/media\/2611"}],"wp:attachment":[{"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/media?parent=2610"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/categories?post=2610"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mukundasoftware.com\/blog\/wp-json\/wp\/v2\/tags?post=2610"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}