Trixie Hostname Persistence on RaspiOS

Trixie Hostname Persistence on RaspiOS

spectroman
spectroman
20 views

Uploaded image

Short story long, you tried "everything" you thought of, from the helm of obviousness, how to change the hostname of your Trixie on RPi.

But to your deception, after rebooting the hostname comes back.

First thing:

touch /etc/cloud/cloud-init.disabled
hostnamectl set-hostname khamul
nmcli general hostname khamul
shutdown -r now

If that didn't work, second idea:

# cat /boot/firmware/user-data
#cloud-config
manage_resolv_conf: false

hostname: NEWHOSTNAME
manage_etc_hosts: true
packages:
- avahi-daemon
apt:
  preserve_sources_list: true
  conf: |
    Acquire {
      Check-Date "false";
    };
timezone: Europe/Amsterdam
keyboard:
  model: pc105
  layout: "us"
users:
- name: horseman
  shell: /bin/bash
  lock_passwd: false
  passwd: "boingboing"
  ssh_authorized_keys:
    - "ssh-ed25519 boingboing"
enable_ssh: true
ssh_pwauth: false
rpi:
  interfaces:
    serial: true

If after changing there NEWHOSTNAME and rebooting also doesn't help... then i'm out of ideas for you...

Related Posts

SomaFM Tuner
programmingGTKlinuxmusic

SomaFM Tuner

Internet FM script tuner GTK script

3/27/2026Read More →
Custom Fiber Home Link with PFSense
linuxpfsenseinternet

Custom Fiber Home Link with PFSense

To avoid using KPN or other provider router, you can always rely on PFSense and dedicated hardware to make it yourself!

3/27/2026Read More →
Magic Mirror
linuxinternetDIYtinkeringRaspberry Pi

Magic Mirror

The Fun DIY Anyone Can Do!

3/27/2026Read More →