Skip to content

Instantly share code, notes, and snippets.

@arosini
Created March 28, 2016 17:33
Show Gist options
  • Save arosini/72684edc461d0bb4b171 to your computer and use it in GitHub Desktop.
Save arosini/72684edc461d0bb4b171 to your computer and use it in GitHub Desktop.
Sets up a new Linux installation
#!/bin/bash
##################
# Initialization #
##################
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install curl
##########
# Chrome #
##########
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb https://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'
sudo apt-get update
sudo apt-get install google-chrome-stable
##########
# Docker #
##########
sudo apt-get install apt-transport-https ca-certificates
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
sudo "deb https://apt.dockerproject.org/repo ubuntu-wily main" > /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get purge lxc-docker
sudo apt-get install linux-image-extra-$(uname -r)
sudo apt-get install docker-engine
sudo service docker start
sudo usermod -aG docker ubuntu
###########
# Eclipse #
###########
sudo apt-get install eclipse
#######
# Git #
#######
sudo apt-get install git
wget https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh ~/.git-prompt.sh
echo "source ~/.git-prompt.sh" >> ~/.bashrc
echo "PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[01;35m\] \w\[\033[01;34m\]$(__git_ps1) \[\033[01;36m\]\$\[\033[00m\] '" >> ~/.bashrc
########
# Node #
########
curl -sL https://deb.nodesource.com/setup_5.x | sudo -E bash -
sudo apt-get install --yes nodejs
sudo ln -s /usr/bin/nodejs /usr/bin/node
echo "export NVM_DIR=\"/home/$(whoami)/.nvm\"" >> ~/.bashrc
echo "[ -s \"$NVM_DIR/nvm.sh\" ] && . \"$NVM_DIR/nvm.sh\"" >> ~/.bashrc
echo "export NODE_PATH=/usr/lib/nodejs:/usr/lib/node_modules:/usr/share/javascript:/home/$(whoami)/.nvm/versions/node/v5.7.1/lib/node_modules" >> ~/.bashrc
########
# Ruby #
########
gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby
echo "export PATH=\"$PATH:$HOME/.rvm/bin\"" >> ~/.bashrc
echo "[[ -s \"$HOME/.rvm/scripts/rvm\" ]] && source \"$HOME/.rvm/scripts/rvm\"" >> ~/.bashrc
################
# Sublime Text #
################
sudo add-apt-repository ppa:webupd8team/sublime-text-3
sudo apt-get update
sudo apt-get install sublime-text-installer
#################
# Miscellaneous #
#################
echo "eval \"$BASH_POST_RC\"" >> ~/.bashrc
###########
# Cleanup #
###########
sudo apt-get autoremove
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment