My Terminal hostname suddenly changed to an AirPlay device name
Spent days on this then suddenly find out the source, but I still can't address the problem.
On Terminal, my hostname is "Samsung". Despite this has never happened before (it always has been showed up as MacBook-Pro-di-Giuliano) and I do not know why it happened now, I think that it is because I have both my MacBook Pro and a Samsung TV connected to the same WiFi. In fact, when I connect my Mac to a different network as my iPhone router, the Terminal hostname is "correct" (MacBook-Pro-di-Giuliano).
That's obviously annoying and I can't solve it.
I also tried to configure something in AirDrop & Handoff but got no points. The Apple Support neither gave me a valid solution...
On settings, and even by using the `scutil`command, I can see that my local hostname is correct.
MacBook Pro 16″, macOS 14.4