NodeJS NPM install Linux - thiagobs-webdev/helptools GitHub Wiki
How to install NODEJS on linux
# Download do nodejs
-
Download Link (Choose linux version): https://nodejs.org/en/
-
Open terminal:
-
Go to the 'Downloads' directory:
cd Downloads
- Unzip the file (Locate your nodejs file):
tar -Jxf node-v10.16.3-linux-x64.tar.xz
- Create directory:
sudo mkdir /usr/lib/nodejs
- Move the unzipped file to the created directory:
sudo mv node-v10.16.3-linux-x64 /usr/lib/nodejs/node-v10.16.3
- Edit file '~/.profile':
sudo nano ~/.profile
- Insert in file finish':
# nodejs
export NODEJS_HOME=/usr/lib/nodejs/node-v10.16.3
export PATH=$NODEJS_HOME/bin:$PATH
- Restart '~/.profile':
. ~/.profile
- Done, Now test:
node -v
npm -v