install node.js command line code example
Example 1: how to install node js in ubuntu
1: sudo apt-get update
2: sudo apt-get install nodejs
3: sudo apt-get install npm
4: nodejs -v
Example 2: linux install node
sudo apt install nodejs
Example 3: install node js command
# Make a new folder for node
mkdir node
cd node
# Download and unzip node
curl -O https:
tar -xvzf node-v10.15.3-linux-x64.tar.gz --strip-components=1
# Add node and npm it to PATH (and do so for future sessions too)
export PATH=$HOME/node/bin:$PATH
echo 'export PATH=$HOME/node/bin:$PATH' >> ~/.bashrc
Example 4: cmd node.js instal
npm install -g npm