<div>Oh it is worse than that.<br></div><div><br></div><div>A system really doesn't have a canonical host name per se.  It can have:<br></div><div><br></div><div>1. One IP address and no host names<br></div><div>2. One IP address and one host name<br></div><div>3. One IP address and multiple host names<br></div><div>4. Multiple IP addresses and one host name (different disconnected networks, say IPv6/IPv4 or 1G/10G/40G)<br></div><div>5. Multiple IP addresses and multiple host names (but not necessarily a one to one mapping)<br></div><div><br></div><div>and of course one hostname can map to multiple IP addresses on different independent machines.</div><div><br></div><div>The idea is that a hostname resolves to an address and that address lets you reach an interface on a machine.  <br></div><div><br></div><div>The result of the hostname command does not even have to map in such a way that from outside the machine that hostname will allow you reach that machine.<br></div><div><br></div><div>cheers<br></div><div><br></div><div>bruce<br></div><div><br></div><div><br></div><div><br></div><div ><br></div><div class="ik_mail_quote answerContentMessage" ><div>On 2023-03-30T18:53:50.000+02:00, tim Rowledge <tim@rowledge.org> wrote:</div><blockquote class="ws-ng-quote"><pre style="white-space: normal;"><blockquote class="ws-ng-quote">  On 2023-03-29, at 11:32 PM, Jakob Reschke <<a target="_blank"  class="defaultMailLink" href="mailto:jakres+squeak@gmail.com">jakres+squeak@gmail.com</a>> wrote:<br/> <br/> Hi,<br/> <br/> I cannot contribute to the concrete question, but note that a host can have multiple addresses and can therefore be reachable under multiple host names. Depending on what you try to do, it may matter and you better check that you actually get the name that you expect in your production environment.<br/></blockquote> <br/>Yup, we've managed to make it very complicated. I'm sure OS people had excellent reasons but, boy, I wish somebody had seen a way to make it simpler. Anyway, my hypothesis is that using the hostname command means that we (Squeak) do do at least as well as we (commandline) can sensibly manage. If it is really the case that the question isn't properly answerable then we ought to remove the related methods etc so as to remove a point of confusion and error.<br/><br/>tim<br/>--<br/>tim Rowledge; <a target="_blank"  class="defaultMailLink" href="mailto:tim@rowledge.org">tim@rowledge.org</a>; <a target="_blank"  class="defaultMailLink" href="http://www.rowledge.org/tim">http://www.rowledge.org/tim</a><br/>Strange OpCodes: START: Cancel preceding jobs in queue</pre></blockquote></div>