O'Reilly logo

Linux® Desk Reference, Second Edition by Scott Hawkins

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Commands

hostname

[-v] [-a] [--alias] [-d] [--domain] [-f] [--fqdn] [-i] [--ip-address] [--long] [-s] [--short] [-y] [--yp] [--nis]

hostname

[-v] [-F filename] [--file filename] [hostname]

domainname

[-v] [-F filename] [--file filename] [name]

hostname

[-v] [-h] [--help] [-V] [--version]

dnsdomainname

[-v]

nisdomainname

[-v]

ypdomainname

[-v]

This program will either set or display the specified network name. Note that you cannot change the FQDN with this command.

Example: To set the domain name of the current domain to be asgard, use

domainname asgard

-a, --alias Displays alias name of host.
-d, --domain Displays DNS domain name.
-F, --file

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required