Skip to content

Instantly share code, notes, and snippets.

@bitcrazed
Last active June 1, 2019 04:50
Show Gist options
  • Save bitcrazed/79594a6f28e7f76ae45ad1ccfb554755 to your computer and use it in GitHub Desktop.
Save bitcrazed/79594a6f28e7f76ae45ad1ccfb554755 to your computer and use it in GitHub Desktop.
Script to setup basic Ubuntu dev environment, esp. for Ubuntu on Windows Subsystem for Linux (WSL)
#!/bin/bash
# Author: Rich Turner [rich@bitcrazed.com]
# Source: https://gist.github.com/bitcrazed/79594a6f28e7f76ae45ad1ccfb554755
# License: WTFPL: http://www.wtfpl.net/
# Instructions: Install using the following: $ source <(curl -s <URL-TO-THIS-RAW-FILE>)
# Let's get apt up to date:
sudo apt update -y
# Add some PPA's so we always get the latest bits & pieces:
## GIT:
sudo add-apt-repository -y ppa:git-core/ppa
## Node:
curl -sL https://deb.nodesource.com/setup_6.x | sudo -E bash -
## CoreCLR - https://www.microsoft.com/net/core#linuxubuntu
curl https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.gpg
sudo mv microsoft.gpg /etc/apt/trusted.gpg.d/microsoft.gpg
sudo sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-ubuntu-xenial-prod xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
# Update apt once more
sudo apt update -y
# Install all the good stuff. This also brings in gcc, etc.
sudo apt install -y \
fortune-mod \
cowsay \
lolcat \
htop \
git \
build-essential \
nodejs \
dotnet-sdk-2.0.0 \
ruby-bundler \
python
# Other things you might want to install:
## For Jekyll, be sure to install the following to ensure nokogiri works:
# jekyll ruby-dev zlib1g-dev liblzma-dev
# Upgrade to all the latest bits:
sudo apt upgrade -y
echo ""
echo "Post-installation steps:"
echo "1. Create a symlink from home into your dev folder, e.g. `$ ln -s /mnt/d/dev/ ~/dev`
echo "2. Copy your Windows SSH keys into your Linux session, e.g. `$ cp -r /mnt/c/Users/<user>/.ssh/ ~/.ssh/`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment