Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Setting up a new Ubuntu Laptop
# Update repos
#
sudo apt update
sudo apt install --only-upgrade -y \
  gcc-5-base \
  libstdc++6

# Tools
#
sudo apt install -y \
  git

# File Sync
#
# Dropbox and Google Drive
#
sudo apt install -y \
  nautilus-dropbox \
  gnome-control-center \
  gnome-online-accounts

# Google Chrome
#
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" | sudo tee /etc/apt/sources.list.d/google-chrome.list
sudo apt update
sudo apt-get install -y \
  google-chrome-stable

# Docker
# Seems not to be needed:
#
#  sudo apt-get install apt-transport-https ca-certificates
#
sudo apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys 58118E89F3A912897C070ADBF76221572C52609D
echo "deb https://apt.dockerproject.org/repo ubuntu-xenial main" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt update

# Recommended
#
# Already installed
#
# sudo apt install -y \
#  linux-image-extra-$(uname -r)
  
sudo apt install -y \
  linux-image-extra-virtual

# Install Docker and start the service
#
sudo apt install -y \
  docker-engine
sudo usermod -aG docker $USER
sudo service docker start
sudo systemctl enable docker

# Docker Compose
#
# Install as described here:
#
#  https://github.com/docker/compose/releases
#
sudo wget -O /usr/local/bin/docker-compose https://github.com/docker/compose/releases/download/1.9.0/docker-compose-`uname -s`-`uname -m`
sudo chmod +x /usr/local/bin/docker-compose

# Enpass
#
wget -q -O - https://dl.sinew.in/keys/enpass-linux.key | sudo apt-key add -
echo "deb http://repo.sinew.in/ stable main" | sudo tee /etc/apt/sources.list.d/enpass.list
sudo apt update
sudo apt-get install -y \
  enpass

# Node
#
# Update the repos for PPA:
#
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -

sudo apt install -y \
  nodejs
  
# Sublime Text
#
sudo add-apt-repository -y \
  ppa:webupd8team/sublime-text-3
sudo apt update
sudo apt install -y \
  sublime-text-installer
  
# Zeal
#
# "Zeal is an offline documentation browser for software developers."
# https://zealdocs.org/
#
sudo add-apt-repository -y
  ppa:zeal-developers/ppa
sudo apt update
sudo apt install -y
  zeal

# Security
#
sudo apt install -y \
  encfs \
  cryptkeeper

# SFTP Access:
#
#  See http://www.thegeekstuff.com/2012/03/chroot-sftp-setup.
#
sudo apt-get install -y \
  openssh-server

echo > /etc/ssh/sshd_config <<EOF
Subsystem sftp internal-sftp

Match Group sftpusers
  ChrootDirectory /sftp/%u
  AllowTCPForwarding no
  ForceCommand internal-sftp
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment