Menu

Post image 1
Post image 2
1 / 2
0

Installing Node.js and npm on Ubuntu 26.04

DEV Community·Sanskriti Harmukh·28 days ago
#V4478FTx
Reading 0:00
15s threshold

Ubuntu's default APT repository ships an outdated Node.js build that is not suitable for modern JavaScript development. This guide installs Node.js 24.x from the NodeSource repository and covers NVM as an alternative for managing multiple versions side by side, verified with a running Express application confirming the setup. Install Node.js via NodeSource NodeSource maintains a Debian/Ubuntu repository that tracks current Node.js major releases, providing a single pinned version installed system-wide. 1. Update the APT package index: $ sudo apt update Enter fullscreen mode Exit fullscreen mode 2. Download the NodeSource setup script: $ curl -fsSL https://deb.nodesource.com/setup_24.x -o nodesource_setup.sh Enter fullscreen mode Exit fullscreen mode 3. Run the setup script: $ sudo bash nodesource_setup.sh Enter fullscreen mode Exit fullscreen mode 4. Install Node.js: $ sudo apt install nodejs -y Enter fullscreen mode Exit fullscreen mode 5.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More