I have a local network at home. This network contains 5 laptops. One of the laptops is a Mac with macOS 10.8 on it. The other has a Linux installed, all others run Windows.
When trying to open my router and check "Connected devices", under the IP address of this Mac I see following:
Host Name - some IPV6 address
What I'd rather prefer to see is some meaningful name so that I can use that in the /etc/hosts file in Linux laptop. And also I'd like to check the computer name so that the /etc/hosts line was proper.

scutil --get HostNameshows the current value of HostName. – codeforester Jan 26 '21 at 21:56hostnamealso shows the current value of HostName, right? Or is there some difference between this andscutil --get HostName? – scrpy Jan 19 '22 at 16:10sudo hostname <new-host-name>also sets hostname that can be used from terminal. It would be nice to see what is the difference and relations between these internal hostnames in MacOS and standard *nix hostnames (as @scrpy asked). Additionally,System Preferences -> Sharingis another place to change some hostname, so again, what is the diff to previous hostname settings? – Robert Lujo Jun 30 '22 at 12:16