Skip to content

Instantly share code, notes, and snippets.

@curtismckee
Last active December 1, 2020 15:14
Show Gist options
  • Save curtismckee/ce5b76ee4dc5c6b26eb821d3b952a6b0 to your computer and use it in GitHub Desktop.
Save curtismckee/ce5b76ee4dc5c6b26eb821d3b952a6b0 to your computer and use it in GitHub Desktop.

A fresh xUbuntu 18.04 LTS installation

The newest Ubuntu LTS version code named Bionic Beaver was released a few months ago and I thought it was finally time to upgrade. I also thought I would take this opportunity to write down the steps taken for my reference and anyone else who might find it useful.


Making sure all your software is up to date and all per-requisites are installed.

First things first, we want to make sure we are fully up-to-date on our fresh system. This will allow us to install the newest versions of all packages currently installed on the system from the sources file at /etc/apt/sources.list.

sudo apt-get upgrade

A quick command for a few development tools that will help us get up and running quicker. All other programs or libraries we install that require other dependencies should install them along side the package.

sudo apt-get install -y wget curl build-essential

Python Pip

The new Linux installation should come with python by default and we've already updated all default packages. Lets make sure we have the most up-to-date version of pip as well.

sudo apt-get install -y python-pip
pip install -U pip

Java

Another necessary language to have installed on your machine.

sudo add-apt-repository ppa:webupd8team/java
sudo apt update
sudo apt install -y default-jre
java --version

Android

Two programs for android development: First Android Studio & then Anbox.

sudo snap install android-studio --classic
sudo add-apt-repository ppa:morphis/anbox-support
sudo apt update
sudo apt install linux-headers-generic anbox-modules-dkms

sudo modprobe ashmem_linux
sudo modprobe binder_linux

sudo snap install --devmode --beta anbox
snap refresh --beta --devmode anbox

sudo apt install android-tools-adb

Node

For any kind of front-end work you most likely will be using Node. I opt to use yarn instead of npm.

curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt-get install -y nodejs

curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
sudo apt-get update
sudo apt-get install -y yarn

RVM, Ruby & Rails

As a Ruby developer I'd say this one is pretty mandatory. I'm going to go with RVM for this. Lets add our keys and grab the recent stable version of rvm. After the install finishes up, lets source the file.

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
curl -sSL https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm

As of writing this ruby-2.5.1 is the most recent version, we will use this and set it to our default version.

rvm install 2.5.1
rvm use 2.5.1 --default
ruby -v

Lets install the gem bundler for installing rails. Make sure you have installed node if you haven't. As of writing Rails-5.2.0 is the most recent version.

gem install bundler
gem install rails -v 5.2.0
rails -v

Golang

My personal favorite language to use. Golang is version 1.10.3 as of this writing. 1.11beta1 is available though.

wget https://dl.google.com/go/go1.10.3.linux-amd64.tar.gz
tar -C /usr/local -xzf go1.10.3.linux-amd64.tar.gz

As of version 1.8 I think, it automatically sets your $GOROOT so no need to worry about that. Next add our golang install to your path. And last we set the $GOPATH variable. Think of this as your golang working directory, golang depends on this path to execute in your development environment. My .zshrc looks like this.

export GOPATH=/home/cmckee/Development/go                                                                                                                                                                  
export PATH=$PATH:$GOPATH:/usr/local/go/bin  

Git

If your a developer this is a must. We will also set some basic global config values for our name, email and editor of choice. Also lets take a look to make sure they were set correctly.

sudo apt-get install -y git
git --version
git config --global user.name "Curtis Mckee"
git config --global user.email cmckee-dev@gmail.com
git config --global core.editor vim
git config --list

Next steps would be generating ssh keys and adding them to Github or Gitlab. We will just generate the keys for now. Github has a great article on all the steps here.

ssh-keygen -t rsa -b 4096 -C "cmckee.dev@gmail.com"
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa

Termite terminal

There are many options for choosing a terminal when it comes to Linux distros. I've settled on Termite. A simple, straight forward terminal with basic configuration options. Corwind has been nice enough to make the install process easy on us. Check his repo out here.

git clone https://github.com/Corwind/termite-install.git
cd termite-install
./termite-install.sh
cd .. && rm -rf ./termite-install

Vim + Tmux

I use Vim + Tmux for my development workflow. Lets just get things installed for now and I'll leave the addons, basic tutorial, configuration, tips and tricks, walk through, etc. for other posts.

sudo apt-get install -y vim tmux

Atom

I like to have another editor on my machine for pair-programming sessions. I rarely use it but its good to consider your co-workers sanity.

sudo add-apt-repository ppa:webupd8team/atom
sudo apt-get update
sudo apt-get install -y atom

Docker

18.04 LTS released fairly recently, so there isn't a stable build for docker-ce quite yet. When adding the repository we've included the edge tag that allows us to get the 18.04 version.

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable edge"
apt-cache policy docker-ce
sudo apt-get install -y docker-ce
sudo systemctl status docker

If you use docker extensively like I do, running sudo each time becomes a pain. Lets add your user to the docker group. After we will need to apply those group rights we just set. Alternatively you can just restart the terminal.

sudo usermod -aG docker ${USER}
su ${USER}

Postgresql

For our primary sql database lets install postgresql.

sudo apt install -y postgresql postgresql-contrib
sudo systemctl status postgresql

To use the \psql command line, either you use the postgres user or create a user. Let create our user.

sudo -u postgres createuser --interactive
sudo -u postgres createdb ${USER}

Albert Launcher

I use it primarily to open and run applications quickly or open files with a few keystrokes. Albert is capable of a lot more; Searching through Chrome or Firefox Bookmarks, Generate Hashes quickly, using the Calculator or even storing Snippets. Check it out here.

wget -nv -O Release.key \
  https://build.opensuse.org/projects/home:manuelschneid3r/public_key
sudo apt-key add - < Release.key
sudo apt-get update

sudo sh -c "echo 'deb http://download.opensuse.org/repositories/home:/manuelschneid3r/xUbuntu_18.04/ /' > /etc/apt/sources.list.d/home:manuelschneid3r.list"
sudo apt-get update
sudo apt-get install -y albert

After installing, you will need to open Albert and set the hot-key as well as what kinds of actions you want Albert taking. Everything is disabled by default.


Postman

Postman is a great tool for api development. Mskian has a wonderful gist for an install script here. Lets download and run it.

wget --no-check-certificate https://gist.githubusercontent.com/mskian/ec81458e42ee1d69b9156441c7dabc3d/raw/800cc8e77279413d7a4adc212d356b3988166b9b/install-postman.sh
bash install-postman.sh

Slack

Slack is another must have for developers.

sudo apt update
sudo apt install snapd
sudo snap find slack
sudo snap install slack --classic

Spotify

Spotify is a must have for me.

sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 0DF731E45CE24F27EEEB1450EFDC8610341D9410 931FF8E79F0876134EDDBDCCA87FF9DF48BF1C90
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 94558F59
apt-get update
apt-get install -y spotify-client

Razer Gaming Devices

I am a gamer and I use Razer. I also enjoy that the company advocates and supports linux platforms as well. Lets add some drivers for razer devices support and install a gui for changeing color, effects, speed, sens, etc.

sudo add-apt-repository ppa:openrazer/stable
sudo apt update
sudo apt install openrazer-meta

sudo add-apt-repository ppa:polychromatic/stable
sudo apt update
sudo apt install polychromatic
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment