Skip to content

Instantly share code, notes, and snippets.

@pubkey
Last active May 6, 2024 16:16
Show Gist options
  • Save pubkey/27083b667698b8d7b32bbcb0d413f78b to your computer and use it in GitHub Desktop.
Save pubkey/27083b667698b8d7b32bbcb0d413f78b to your computer and use it in GitHub Desktop.
#run all via:
# wget -O - https://gist.githubusercontent.com/pubkey/27083b667698b8d7b32bbcb0d413f78b/raw/6a2a75097112f1c4d25800cf03c7de025663fd17/new_linux.bash | bash
apt-get update
apt-get upgrade -y
apt-get dist-upgrade -y
# choo choo!
apt-get install sl -y
apt-get install curl -y
apt-get install htop -y
apt-get install git -y
apt-get install gitk -y
# save git credentials for very long
git config --global credential.helper "cache --timeout=35000"
# Set default git merge behavior
git config pull.rebase false
# add git permission-reset https://stackoverflow.com/a/4408378/3443137
git config --global --add alias.permission-reset '!git diff -p -R --no-color | grep -E "^(diff|(old|new) mode)" --color=never | git apply'
# things for builds (g++ etc.)
apt-get install build-essential -y
## nodejs LTS ##
# check for new version at https://nodejs.org/en/download/releases/
apt-get install wget -y
cd /usr/local
wget https://nodejs.org/dist/v17.9.0/node-v17.9.0-linux-x64.tar.gz -O nodejs.tar.gz
tar -C /usr/local --strip-components 1 -xzf nodejs.tar.gz
## symlinks
ls -l /usr/local/bin/node
ls -l /usr/local/bin/npm
ln -s `which node` /usr/bin/nodejs
## remove tar-file
rm nodejs.tar.gz
#upgrade to latest version
npm i -g npm
npm cache clean -f
npm install -g n
n latest
# https://docs.npmjs.com/cli/v6/commands/npm-completion
npm completion >> ~/.bashrc
# --save-exact as default
npm config set save-exact true
#some npm-mods
npm i local-web-server -g
npm i npm-check -g
# docker
curl -sSL https://get.docker.com/ | sh
# docker-compose
curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose
# virutalbox
apt-get install virtualbox virtualbox-qt virtualbox-dkms -y
apt-get install virtualbox-guest-additions-iso -y
#nvidia-gpus need their driver - cautionary install
#@link https://mintguide.org/system/479-install-the-nvidia-driver-352-30-on-linux-mint.html
sudo add-apt-repository ppa:graphics-drivers/ppa -y
sudo apt-get update
# show available versions
grep ^Package: /var/lib/apt/lists/ppa.launchpad.net_*_Packages | grep 'nvidia-3'
sudo apt-get install nvidia-390 nvidia-settings -y
# pin version because updates often break things
apt-mark hold nvidia-390
glxinfo | grep OpenGL
#java jdk v8
#@link http://www.webupd8.org/2012/09/install-oracle-java-8-in-ubuntu-via-ppa.html
sudo add-apt-repository ppa:webupd8team/java -y
sudo apt-get update
echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | sudo /usr/bin/debconf-set-selections
sudo apt-get install oracle-java8-installer -y
sudo apt-get install oracle-java8-set-default # set env variables
java -version
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment