Cheatsheet for Setting up Pi Devices
Quickly setting up new single-board computers like Raspberry Pi. This article is part of the Edge Development Cheatsheet series. This is mostly based on my personal development requirements. It is best applicable for boards like Orange Pi and Raspberry Pi. Wired or wireless For first-boot setup and local debugging (Optional) use vendor-provided tools like Update latest CMake on Ubuntu (generated by Claude): Install latest standard library: One-liner to use SSH url: Recursive script: HF mirror: Mindscope: See more of the Edge Development Cheatsheet series.Hardware
Network connection
Keyboard, mouse, and display
TF (MicroSD) card with OS flashed
System
Set/change the username and password if required
Connect to the (wireless) network
cloud-init
, netplan
, and networkd
by default.NetworkManager
as it’s more familiar.NetworkManager
with Ubuntu nmcli dev wifi
nmcli dev wifi connect <ssid> password <passwd>
Configure the network if required
Install/update necessary packages
sudo apt update && sudo apt upgrade
Setup SSH server for remote access
sshd
to launch the SSH serverifconfig
to view the device IPssh -p <port> user@ip
to test loginssh-copy-id
for key authOthers
raspi-config
(for Raspberry Pi) and orangepi-config
(for Orange Pi) for more interactive configuration.Environment
Basic tools and packages
sudo apt install tmux
sudo apt install git
Build tools and compilers
sudo apt install cmake
sudo apt install build-essential
bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
$CC
and $CXX
enviroment variables are correctly set, or the building tools (e.g., CMake) might use the wrong compiler and cause errorsPython environments
curl -O https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-aarch64.sh
bash ~/Miniconda3-latest-Linux-aarch64.sh
sudo
or will be installed to another locationsudo apt install python3-venv
Containers
Quick Fix
CMake update
| |
Compiler
sudo apt install libstdc++-12-dev
Git Clone
sed -i 's/https:\/\/github.com\//git@github.com:/' .gitmodules
# Function to update .gitmodules and sync
# Function to process each level
# 5. Repeat multiple times to ensure all nested levels are processed
for; do
done
Huggingface
export HF_ENDPOINT=https://hf-mirror.com
https://www.modelscope.cn/home