Junior — Middle
How can you install Node.js on the Astra Linux operating system?
sobes.tech AI
Answer from AI
To install Node.js on Astra Linux, you can use several approaches:
- Using the
aptpackage manager (if Node.js is available in Astra Linux repositories):
sudo apt update
sudo apt install nodejs npm
- Installing via Node Version Manager (nvm):
- Install nvm:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.4/install.sh | bash
source ~/.bashrc
- Install the desired Node.js version:
nvm install node
nvm use node
- Downloading official binary files from the Node.js website:
- Go to https://nodejs.org/en/download/
- Download the archive for Linux
- Extract and add to PATH
Using nvm is preferable as it allows easy management of Node.js versions without conflicts with system packages.