My Linux Setup

April 13, 2019

This is mostly just reference for me, because I get tired of hunting down all of the links and instructions for everything. Several of the installations below rely on the basic tools listed in the first header. So if you pick and choose what you install and it doesn’t work, check the basic tools section.

Note: At some point I will most likely convert this over to an Ansible playbook but for now, I’m going to stay lazy.

Basic Tools

sudo apt-get install vim htop curl apt-transport-https ca-certificates software-properties-common

YubiKey

sudo add-apt-repository ppa:yubico/stable
sudo apt-get update
sudo apt-get install libpam-yubico -y

See the file /usr/share/doc/libpam-yubico/README.Debian after installing.

Zerotier

I have a bunch of private networks I run on Zerotier that I need access to.

I don’t generally run a pipe into bash command, but I’ve reviewed the script they use for installation and am okay with everything they’re doing. I HIGHLY suggest you read through the installation script located at https://install.zerotier.com.

curl -s https://install.zerotier.com/ | sudo bash

Syncthing

To install Syncthing, pop open terminal and then:

curl -s https://syncthing.net/release-key.txt | sudo apt-key add -
sudo -i
echo "deb https://apt.syncthing.net/ syncthing release" > /etc/apt/sources.list.d/syncthing.list
exit
sudo apt-get update
sudo apt-get install syncthing

Once it’s installed, then we need to create the systemd service.

sudo vim /etc/systemd/system/syncthing@.service

Fill it with the following (note that the GUI is only listening on localhost, I like also allow it to listen on my private zerotier network):

[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target

[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -gui-address="127.0.0.1:8384" -no-restart -logflags=0
Restart=on-failure
SuccessExitStatus=3 4
RestartForceExitStatus=3 4

[Install]
WantedBy=multi-user.target

Then we need to reload and enable the service.

sudo systemctl daemon-reload
sudo systemctl enable syncthing@live_archivist.service
sudo systemctl start syncthing@live_archivist.service

Bitwarden

Password manager:

sudo snap install bitwarden --classic

Then install the Firefox Add-On.

Docker

Let’s get Docker installed and add my user to the docker group.

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 bionic stable
sudo apt update
sudo apt install docker-ce
sudo usermod -aG docker ${USER}
su - ${USER}

Now let’s pull down some of the images I use often:

docker pull alpine
docker pull ruby
docker pull redis
docker pull mongo
docker pull ubuntu:xenial

Discord

sudo snap install discord --classic

Slack

sudo snap install slack --classic 

Atom

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

Chrome

wget -O /tmp/google-chrome-stable_current_amd64.deb "https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb"
sudo gdebi /tmp/google-chrome-stable_current_amd64.deb