My MacBook Pro (running BigSur 11.2.1) now - since I rebooted it last night - keeps showing the host name as 'HUAWEI_Y6_2019-{hhhhhhhhhh}' in the bash prompt. (The hh's are a 10-digit hex string.)
The hostname command likewise reports this value.
In System Preferences > Sharing, Computer Name still shows as 'macbook' (which is what the prompt used to say). I've tried editing that, then editing it back, and that fixed the prompt for new bash sessions - for a while. Now it has started doing it again.
These are not remote bash sessions just bash shells on the local machine.
Does anyone have any idea why this might be happening? Or where the value is coming from?
As far as I'm aware there's no Huawei hardware on my home network (unless the 'BT' badged hub is really a Huawei box).
UPDATE: I have reviewed OS X computer name not matching what shows on terminal but that seems to refer to a remote bash session. That is not the case here.
HUAWEI_Y6_2019
it turns out they make an android phone "Y6" from 2019. – Marcel Wilson Aug 10 '22 at 20:05scutil --set HostName name_of_your_mbp
? if so, does it still reset after a while? – Marcel Wilson Aug 10 '22 at 20:09sudo scutil -set HostName <name>
seems to have 'fixed' the problem, in the sense that the host name is now what it is supposed to be. Still don't know why it is happening - and why now, in particular. Still wait to see if it sticks or resets. Did confirm that the 'BT' badged hub is actually Huawei hardware. – Paul Aug 10 '22 at 22:32