Link Search Menu Expand Document

Common Setup

User Permissions

sudo usermod -a -G dialout,gpio,i2c,spi <<username>>

My own personal preference is to not require a password when issuing a sudo command (for those in the sudo group):

sudo sh -c 'echo "%sudo ALL=(ALL:ALL) NOPASSWD: ALL" > /etc/sudoers.d/01_sudo-nopassword'

Development Libraries and Tools

sudo apt -y install avahi-daemon gcc make unzip zip vim git
sudo apt -y install i2c-tools libi2c-dev gpiod libgpiod2 libgpiod-dev libpigpiod-if-dev libpigpiod-if2-1


sudo apt -y install openjdk-17-jdk-headless


sudo apt -y install zsh
chsh -s /usr/bin/zsh
sh -c "$(curl -fsSL"

Make a minor tweak to the robbyrussell theme to show the hostname in the command prompt:

cd ~/.oh-my-zsh/themes
cp robbyrussell.zsh-theme robbyrussell_tweak.zsh-theme

Edit robbyrussell_tweak.zsh-theme and change the PROMPT value to include this prefix %{$fg_bold[white]%}%M%{$reset_color%} . The PROMPT line should look like this:

PROMPT="%{$fg_bold[white]%}%M%{$reset_color%} %(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ )"

Update the ZSH config ~/.zshrc:

export PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-armhf


My own preference is to add this to the end of the .zshrc file:

# Allow multiple terminal sessions to all append to one zsh command history
# Do not enter command lines into the history list if they are duplicates of the previous event
# Remove command lines from the history list when the first character on the line is a space
# Remove the history (fc -l) command from the history list when invoked

System Update / Upgrade Script

Create /usr/local/sbin/system-update:


apt update && apt -y --auto-remove full-upgrade
apt -y autoclean

Make it executable: sudo chmod +x /usr/local/sbin/system-update

Locale / Timezone

sudo apt install locales
sudo localectl set-locale en_GB.UTF-8
sudo timedatectl set-timezone Europe/London

Run: sudo dpkg-reconfigure locales

Select the appropriate locale, e.g. en_GB.UTF-8

Run: sudo dpkg-reconfigure tzdata

Select the appropriate timezone, e.g. Europe / London

Enable / Disable Graphical Desktop

Pick one:

sudo systemctl set-default
sudo systemctl set-default

Connect to WiFi

sudo nmcli r wifi on
sudo nmcli dev wifi connect <<ssid>> password <<password>>