Mon Mar 30, 2020 4:23 pm
jbudd wrote: ↑Mon Mar 30, 2020 3:40 pm
You can do it if you boot your PC from a Linux live USB drive.
Replace "raspberrypi" with your chosen hostname in [mount point of SD rootfs]/etc/hosts and [mount point of SD rootfs]/etc/hostname
Or, if you've another uSDHC card that you can boot your P4B from (with the "wrong" hostname) and a USB card reader to put the, not yet booted uSDHC card in, edit the equivalent files on that. (effectively that's what I used to do, albeit on a Pi that had just been first-booted, before there was a raspi-config option:
https://www.cpmspectrepi.uk/raspberry_p ... tName.html ie. in the "Wheezy" days

)
Trev.
Still running Raspbian Jessie or Stretch on some older Pi's (an A, B1, 2xB2, B+, P2B, 3xP0, P0W, 2xP3A+, P3B+, P3B, B+, and a A+) but Buster on the P4B's. See: https://www.cpmspectrepi.uk/raspberry_pi/raspiidx.htm