Renamed iMac but file sharing still uses old name
In System Settings —> Sharing I renamed my iMac. My hostname now is, let's say, Newname.local. My iPhone lists Newname as one of my devices.
The various sharing methods, however, still show the old name. Screen sharing says the address is "vnc://oldname/." File sharing says to use "smb://oldname." Remote login says to type "ssh username@oldname."
I've tried restarting; I've tried turning off sharing, restarting and turning sharing back on. I still see the old name in the places I mentioned.
How do really I rename my iMac? Is there a Terminal command? System Settings appears to be ineffective. Thanks in advance!
iMac (2017 – 2020)