Skip to main content



Create unique Raspberry Pi host names

Why? Manually naming IOT devices can get pretty tedious.  The following script generates a "unique" host-name based on existing device specific identifiers. The script can generate host-names based on identifiers or retrieve host names from a config file.
Better living through scriptingRun the script as a non privileged user to see the calculated name.Run the script with escalated privilege to change the host-name.
Past the following into a file on your Raspberry Pi. This file is available on GitHub

#!/bin/bash # Created 2018-03-20 # derived from 2017-08-18 # script to set Pi hostname based on MAC (or Serial number) # This script should be run as root (or with sudo) to change names # If run by a user it will report changes, but will NOT implement them # Creates a unique name using the CPUID. This is the as the MAC when one exists # Works for PiB (all models), Pi2, …

Latest Posts

HTTP control, relay control and OTA/HTTP firmware updates using an ESP8266 for just $11

Setting up the Raspberry Pi Zero without HDMI or OTG

DotNet Core script case sensitivity on Linux systems, like AWS AMI

Browsers implement CORS to protect users, not servers

Another computer is using the printer MG5500 wireless

Validate your Spring yml properties files with a unit test in your CI build

The value curve for new hires in skills positions

Black Swan IT Projects: The Loan Servicing mainframe replacement

Sales Engineer Guide: Hunter or Farmer

Playing with Web Apps in Azure? Create a Resource Group and App Service plan first.