Not sure if this has been posted already somewhere, but the latest Raspberry-Imager does have a hidden option which makes the setup of a new device a bit more comfortable.
While having the Raspberry-Imager open, you can open a settings menu by pressing CRTL-SHIFT-X
There you have several options to configure the SD card while image is writing:
Setup hostname
Enable SSH
Configure WiFi
Configure Locales
I’ve tested it with the Raspberry OS lite image. It might not work on other images like Ubuntu.
I’ve seen this for Mac Devices so far, but i’ve tested it on my Linux Mint Notebook where the screenshot below is taken from.
Maybe a comfortable option instead of editing config files for first start.
The tool is available directly from Raspberry Foundation:
Yes, the feature has been integrated in the latest 1.6 versions only as far as i know.
I do have 1.6 (latest version of repository) and it is there too.
Update:
Just wrote an image with options set to an SD card and mounted it on my spare Raspberry 4
Worked without issues. IP adress received, Hostname and locales were set as expected and SSH is working.
Yes, can be done with some text editing, but i feel more comfortable with it
That’s correct, I always run them on that setup on first boot, if something is wrong with the hardware you can see it happening.
Being in IT for a living makes the availability of these items a no-brainer for me.
Had a board with a kernel panic a few weeks ago, that would be hard to spot in a headless setup.
Then I would have been hunting for quite a few hours to determine why the Pi doesn’t appear in my network ( been there once )
After the inital setup i run them headless from that point onward.