Skip to content

Instantly share code, notes, and snippets.

@kidwai
Created October 1, 2017 02:09
Show Gist options
  • Save kidwai/dbba77d7879a505938b3c4baef7048cb to your computer and use it in GitHub Desktop.
Save kidwai/dbba77d7879a505938b3c4baef7048cb to your computer and use it in GitHub Desktop.
A setup script for a fresh installation of Ubuntu 16.04 LTS.
#!/bin/bash
# Run with sudo
if [ ! `whoami` = 'root' ]; then
echo 'you must be root to run setup'
exit
fi
### ESSENTIALS IMO ###
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
apt-get update -y
apt-get install build-essential python-pip nodejs chromium-browser -y
### CONFIGURATIONS ###
# A simple bashrc with a [ user : directory ] ~ style prompt
wget https://gist.githubusercontent.com/kidwai/6a01e57df8654ce11f7f4540ef18948c/raw/4b97125830c51b6bbed6665119350d614298f617/.bashrc -O $HOME/.bashrc
# Todo: pull in some nice bash functions too
# Hide the launcher
gsettings set org.compiz.unityshell:/org/compiz/profiles/unity/plugins/unityshell/ launcher-hide-mode 1
# Set the workspace dimensions
dconf write /org/compiz/profiles/unity/plugins/core/hsize 2
dconf write /org/compiz/profiles/unity/plugins/core/vsize 2
# Git config globals
git config --global user.name kidwai
git config --global user.email mohammad.kidwai@dal.ca
### SUBLIME TEXT SETUP ###
# Add sublime key + repo
wget -qO - https://download.sublimetext.com/sublimehq-pub.gpg | sudo apt-key add -
echo "deb https://download.sublimetext.com/ apt/stable/" | sudo tee /etc/apt/sources.list.d/sublime-text.list
apt-get install sublime-text -y
# This is supposed to get a default package control configuration to be installed on launch.
# Didn't really test this, but it should be simple to set targets to have things preconfigured
# for the packages you want.
wget https://packagecontrol.io/Package%20Control.sublime-package -O $HOME/.config/sublime-text-3/Packages/User/Package\ Control.sublime-settings
### ETHEREUM SETUP ###
add-apt-repository -y ppa:ethereum/ethereum -y
apt-get update -y
apt-get install ethereum -y
# todo: add parity installer
### IPFS SETUP ###
if [ ! `which ipfs` ]; then
wget https://dist.ipfs.io/go-ipfs/v0.4.11/go-ipfs_v0.4.11_linux-amd64.tar.gz -O go-ipfs.tar.gz
tar xvfz go-ipfs.tar.gz
mv go-ipfs/ipfs /usr/local/bin/ipfs
rm -rf go-ipfs.tar.gz go-ipfs
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment