Skip to content

Instantly share code, notes, and snippets.

@LplusKira
Last active May 31, 2020 06:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LplusKira/c2385b1f2f7ad39e7c7b3b9f4c0c8e00 to your computer and use it in GitHub Desktop.
Save LplusKira/c2385b1f2f7ad39e7c7b3b9f4c0c8e00 to your computer and use it in GitHub Desktop.
On (at least) ubuntu 16.04
#!/bin/bash
## - Ref: https://tecadmin.net/install-latest-nodejs-npm-on-ubuntu/
# Configuring ...
printf "Type current usr's password: "
read -s password
echo ""
printf "Type major version (e.g. 12): "
read ver
echo ""
echo "${password}" | sudo -S apt-get update -y
echo "${password}" | sudo -S apt-get install -y curl python-software-properties
curl -sL "https://deb.nodesource.com/setup_${ver}.x" | sudo -S bash -
echo "${password}" | sudo -S apt-get install -y nodejs
# TODO XXX
# validation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment