Ubuntu's default Node.js package follows the operating-system release, while many JavaScript projects ask for a newer upstream runtime. NodeSource publishes APT packages for active Node.js release lines, including the Current line used for the newest major version before it becomes LTS.
The setup_current.x script adds the NodeSource repository for the current major line and leaves package installation to APT. The package is named nodejs, the runtime command is node, and npm is bundled with the NodeSource package.
Use this method when a development host, test server, or build machine needs the Current release instead of Ubuntu's repository version. For production systems, prefer an active LTS line unless the application has already been tested on Current; the exact patch version comes from the NodeSource repository when APT installs the package.
$ sudo apt update
$ sudo apt install --assume-yes curl
$ curl --fail --silent --show-error --location https://deb.nodesource.com/setup_current.x --output nodesource_setup.sh
$ sudo bash nodesource_setup.sh Installing pre-requisites ##### snipped ##### Repository configured successfully. To install Node.js, run: apt install nodejs -y
The Current script selected the node_26.x repository during validation. NodeSource updates this target as the upstream Current line changes.
$ sudo apt install --assume-yes nodejs Reading package lists... Building dependency tree... Reading state information... Solving dependencies... Installing: nodejs ##### snipped ##### Get:2 https://deb.nodesource.com/node_26.x nodistro/main arm64 nodejs arm64 26.3.1-1nodesource1 [40.1 MB] ##### snipped ##### Setting up nodejs (26.3.1-1nodesource1) ...
The architecture and patch version may differ on another Ubuntu host. The important signal is that APT installs nodejs from deb.nodesource.com.
$ node --version v26.3.1
$ npm --version 11.16.0
$ node --eval "console.log('Node.js ' + process.version + ' is running')"
Node.js v26.3.1 is running
$ rm nodesource_setup.sh