How to get localhostname

Is there a way to get the “local host name” in crystal? I didn’t find one by googling and wasn’t sure which class to look in. Java’s equivalent would be InetAddress.getLocalHostName

You may be looking for System.hostname.

1 Like

That worked, thanks!

It’s in kind of a funky location since it’s more of a network thing in my head, but at least it’s there, thank you!