hostname flags & options
Default usage
Display the current hostname.
hostname
-f, --fqdn
Show the fully qualified domain name.
hostname -f
-i, --ip-address
Show the IP address associated with the hostname.
hostname -i
-d, --domain
Show the DNS domain name.
hostname -d
-s, --short
Show the short hostname, trimmed at the first dot.
hostname -s
-I, --all-ip-addresses
Show all network addresses of the host.
hostname -I