HOSTNAME(1) User Commands HOSTNAME(1)

hostname - show or set system host name

hostname [OPTION...] [NAME]

Show or set the system's host name.
-a, --aliases
alias names
-d, --domain
DNS domain name
-f, --fqdn, --long
DNS host name or FQDN
-F, --file=FILE
set host name or NIS domain name from FILE
-i, --ip-addresses
addresses for the host name
-s, --short
short host name
-y, --yp, --nis
NIS/YP domain name
-?, --help
give this help list
give a short usage message
-V, --version
print program version

Mandatory or optional arguments to long options are also mandatory or optional for any corresponding short options.

Written by Debarshi Ray.

Report bugs to <>.

Copyright © 2021 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.

The full documentation for hostname is maintained as a Texinfo manual. If the info and hostname programs are properly installed at your site, the command
info hostname

should give you access to the complete manual.

February 2021 GNU inetutils