Raspian 13 (trixie)

Prepare SD card

  • Download and install the Raspberry Pi Imager
  • Run the imager and follow the on-screen instructions which takes you through all settings and let's you set the user, default SSH login and hostname

Install OS

  • Boot from SD card
  • Update all packages
    sudo apt update
    sudo apt upgrade

Install functionality

Dynamic DNS

Find the external IP address

curl ifconfig.me: Displays your public IP address directly.
curl -s ipinfo.io/IP: Alternative method to show only the IP.
dig TXT +short o-o.myaddr.l.google.com @ns1.google.com: Queries Google's DNS server for your IP. 
wget "https://www.duckdns.org/update?domains={YOUR_SUBDOMAIN}&token={YOUR_TOKEN}&ip="

echo "word" > filename.txt

#!/bin/bash
while read line; do
  word=( $line )
  echo $word
done < $1
if [ $word == "192.168.1.1" ]; then
  echo "equal"
else
  echo "not equal"
fi