hostname
hostname returns the machine's network hostname.
Signature
hostname(): stringtyrus
import { hostname } from "tyrus:os";
const name: string = hostname();
print(`running on ${name}`);Never fails the program
Falls back to "unknown" if the operating system does not report a hostname, rather than aborting the program.
