To install Node.js and npm on Linux, follow these steps:
1. Update Package List: Run sudo apt update to update your package list.
2. Install Node.js: Use the command sudo apt install nodejs to install Node.js.
3. Install npm: Run sudo apt install npm to install npm (Node Package Manager).
4. Verify Installation: Check if Node.js and npm were installed correctly by running node -v and npm -v to display their versions.
Alternatively, you can install a specific version of Node.js via NodeSource or use a version manager like nvm for more control over versions.