Install Node.js and npm
Install Node.js and npm using the apt package manager:
This command installs both Node.js and npm together.
Verify Node.js version
Check that Node.js was installed successfully:You should see output similar to
v18.17.0.Alternative: Install specific version
If you need a specific version of Node.js, you can:- Install NodeSource repository:
- Install Node.js:
Next Steps
Now that Node.js and npm are installed, you can:- Create new Node.js projects with
npm init - Install packages with
npm install - Run Node.js applications
- Use npm scripts for automation