{"id":29395236,"url":"https://github.com/itspriyanshuks17/nodejs_ubuntu","last_synced_at":"2026-05-18T17:04:44.290Z","repository":{"id":303732176,"uuid":"1016494615","full_name":"itspriyanshuks17/nodejs_ubuntu","owner":"itspriyanshuks17","description":"This guide explains how to install Node.js on Ubuntu running in Windows Subsystem for Linux (WSL).","archived":false,"fork":false,"pushed_at":"2025-07-09T05:25:55.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-07-09T06:31:18.344Z","etag":null,"topics":["node-js","sudo","ubuntu","wsl-ubuntu"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/itspriyanshuks17.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-09T05:21:21.000Z","updated_at":"2025-07-09T05:25:58.000Z","dependencies_parsed_at":"2025-07-09T06:32:54.371Z","dependency_job_id":"d34d174b-4253-472a-af9b-13ec68ca4d6b","html_url":"https://github.com/itspriyanshuks17/nodejs_ubuntu","commit_stats":null,"previous_names":["itspriyanshuks17/nodejs_ubuntu"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/itspriyanshuks17/nodejs_ubuntu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriyanshuks17%2Fnodejs_ubuntu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriyanshuks17%2Fnodejs_ubuntu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriyanshuks17%2Fnodejs_ubuntu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriyanshuks17%2Fnodejs_ubuntu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/itspriyanshuks17","download_url":"https://codeload.github.com/itspriyanshuks17/nodejs_ubuntu/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/itspriyanshuks17%2Fnodejs_ubuntu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264572265,"owners_count":23630214,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["node-js","sudo","ubuntu","wsl-ubuntu"],"created_at":"2025-07-10T11:27:20.053Z","updated_at":"2026-05-18T17:04:39.271Z","avatar_url":"https://github.com/itspriyanshuks17.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Installing Node.js on Ubuntu (WSL)\n\nThis guide explains how to install **Node.js** on **Ubuntu running in Windows Subsystem for Linux (WSL)**.\n\n---\n\n## 📦 Method 1: Install via NodeSource (Recommended for LTS)\n\nInstall the latest **LTS** version of Node.js using the official NodeSource setup script.\n\n### Steps\n\n```bash\n# Update the package index\nsudo apt update\n\n# Install curl (if not already installed)\nsudo apt install curl -y\n\n# Download and run NodeSource setup script for Node.js 20.x\ncurl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -\n\n# Install Node.js and npm\nsudo apt install -y nodejs\n\n# Verify installation\nnode -v\nnpm -v\n````\n\n---\n\n## 🔁 Method 2: Install via NVM (Node Version Manager)\n\nUse `nvm` to manage multiple Node.js versions easily.\n\n### Steps\n\n```bash\n# Update the package index\nsudo apt update\nsudo apt install curl -y\n\n# Install nvm\ncurl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash\n\n# Activate nvm (also add this to your ~/.bashrc or ~/.zshrc)\nexport NVM_DIR=\"$HOME/.nvm\"\n[ -s \"$NVM_DIR/nvm.sh\" ] \u0026\u0026 \\. \"$NVM_DIR/nvm.sh\"\n\n# Install latest LTS version of Node.js\nnvm install --lts\n\n# Verify installation\nnode -v\nnpm -v\n```\n\n---\n\n## ⚙️ Method 3: Use a Bash Script (Interactive)\n\nYou can also run an interactive Bash script to choose between **NodeSource** and **nvm** installations.\n\n### 1. Clone the script\n\n```\ngit clone https://github.com/itspriyanshuks17/nodejs_ubuntu.git\ncd nodejs_ubuntu\n```\n\n\n### 2. Run the script\n\n```bash\nchmod +x install-node.sh\n./install-node.sh\n```\n\n---\n\n## ✅ Test the Installation\n\nCreate a test file and run it:\n\n```bash\necho 'console.log(\"Node is working!\")' \u003e test.js\nnode test.js\n```\n\n---\n\n## 🎯 Next Steps\n\n* Install [Yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable) (optional)\n* Start a project with [Next.js](https://nextjs.org/docs/getting-started) or [Express.js](https://expressjs.com/)\n* Use `nvm` to switch between Node.js versions\n\n---\n\n## 🛠️ Troubleshooting\n\n* If `nvm` is not recognized, restart the terminal or run:\n\n  ```bash\n  source ~/.bashrc\n  ```\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitspriyanshuks17%2Fnodejs_ubuntu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fitspriyanshuks17%2Fnodejs_ubuntu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fitspriyanshuks17%2Fnodejs_ubuntu/lists"}