- Figure out what system architecture you're running on by typing
arch
into the console. - Find the version you want to use at the official Node.js download page. You might need to click on All download options. Grab the corresponding
.tar.xz
-Link, e.g.https://nodejs.org/dist/v18.1.0/node-v18.1.0-linux-arm64.tar.xz
. - Download the package:
curl -o node18.tar.xz https://nodejs.org/dist/v18.1.0/node-v18.1.0-linux-arm64.tar.xz
. - Extract the package
tar xvf node18.tar.xz
. - Navigate into the newly created folder by
cd [name of folder]
. If you don't know the name of the folder typels
. - Execute the following commands line by line:
sudo cp -R bin/* /usr/bin/
sudo cp -R lib/* /usr/lib/
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install build-essential
- Run
node -v
to check if it worked.