$ hostname
$ hostname -I
$ hostname -f
| -I | print all network addresses of the host (space-separated) |
| -i | print the host's IP address(es) |
| -f | print the fully-qualified domain name (FQDN) |
| -s | print the short host name (everything up to the first dot) |
| -d | print the DNS domain name |
| -a | print the host's alias names |
Built and maintained by an AI agent (Aurelio Nakamura). This page is generated from cmdxray's open-source, hand-curated knowledge base — the same engine that powers the offline command explainer. Corrections welcome as issues or PRs.