Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
This is how I setup Debian.

Debian/RasPiOS Setup

Steps written for debian-10.7.0-amd64 and 2020-08-20-raspios-buster-arm64-lite at the time of this writing.

Post-Install: Debian

su -
apt-get update && apt-get install -y sudo
usermod -aG sudo robpol86

If running in Hyper-V and you wish to SSH from WSL 2 (make sure address/netmask are within WSL's subnet):

cat >> /etc/network/interfaces <<EOF

allow-hotplug eth1
iface eth1 inet static

Post-Install: RasPiOS

This is for a Raspberry Pi 4 connected to a NexDock Touch.

sudo raspi-config

# System Options
    # Password: Change "pi" password
# Localisation Options
    # Locale: en_US.UTF-8 UTF-8 > en_US.UTF-8
    # Time Zone: US > Pacific Ocean
    # Keyboard Layout: Generic 104-key PC > English (US) > No AltGr/compose key
    # WLAN Country: US
# Interfacing Options
    # SSH: Yes
# Advanced Options
    # Overscan: No

Install/Update Packages

sudo apt-get -y update && \
    sudo apt-get -y install curl git i2c-tools jq lsof moreutils nmap pv telnet vim zsh && \
    sudo apt-get -y upgrade && \
    sudo apt-get -y autoremove


sudo update-alternatives --set editor /usr/bin/vim.basic

# Below command prompts for input
sh -c "$(curl -fsSL"

git -C "$ZSH_CUSTOM/plugins" clone
git clone "$HOME/workspace/diff-so-fancy"

git clone "$HOME/workspace/dotfiles" && cd "$_" && \
    install -m0700 -d ~/.ssh && \
    ln -s "$PWD/ssh_config" ~/.ssh/config && \
    ln -fs "$PWD/vimrc" ~/.vimrc && \
    ln -fs "$PWD/themes/robpol86.zsh-theme" "$ZSH/custom/themes/" && \
    ln -fs "$PWD/" ~/.zshrc && \
    ln -fs "$PWD/" ~/.zprofile && \
    zsh -lc _robpol86_run_once


These instructions are for the PCF8563 chip in the Juice4halt RTC-485 hat. Instructions are based off of and

sudo sed -i "/^#dtparam=i2c_arm=on$/s/#//g" /boot/config.txt
sudo tee -a /boot/config.txt <<< dtoverlay=i2c-rtc,pcf8563
sudo tee /etc/udev/rules.d/85-hwclock.rules <<< \
    'KERNEL=="rtc0", RUN+="/sbin/hwclock --rtc=$root/$name --hctosys"'
sudo apt-get -y purge fake-hwclock
sudo reboot


  • sudo apt-get install python-pip libssl-dev
  • sudo pip install tox
for v in 3.3.6 3.4.3; do
    cd; wget$v/Python-$v.tgz
    tar -xzf Python-$v.tgz; cd Python-$v
    ./configure --prefix=/usr/local && make && sudo make altinstall
    sudo ln -s /usr/local/bin/python${v::3} /usr/bin/python${v::3}
    wget -O - |sudo python${v::3}
    sudo ln -s /usr/local/bin/pip${v::3} /usr/bin/pip${v::3}
    sudo pip${v::3} install virtualenv
sudo rm /usr/local/bin/pip
cd; wget$p-linux-armhf-raspbian.tar.bz2
sudo mkdir /opt/$p
sudo tar -xjf $p-linux-armhf-raspbian.tar.bz2 -C /opt/$p --strip 1
sudo ln -s /opt/$p/bin/pypy3 /usr/bin/pypy3

Simple Git "Server"

Here I'll use terminaltables as an example.

mkdir -p ~/workspace/terminaltables/.git
cd !$ && git init --bare
cat << EOF > hooks/post-receive
while read oldrev newrev ref; do
    branch=\$(echo \$ref |cut -d/ -f3)
    export GIT_WORK_TREE=../\$branch
    [ ! -e \$GIT_WORK_TREE ] && mkdir -p \$GIT_WORK_TREE
    git clean -f -d
    git checkout -f \$branch
chmod +x hooks/post-receive

Run this command on the "client":

  • git remote add rpi ssh://pi@raspberrypi/home/pi/workspace/terminaltables/.git

This comment has been minimized.

Copy link

@n8henrie n8henrie commented May 26, 2016

Is this with Jessie or Wheezy? I'm not having any luck installing pypy3 this way on Jessie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment