Linux: find out information about current domain name and host name
Q. Under Windows Server 2003 I can use active directory domain tools to get information about current domain and hostname. Can you tell me command to list current domain name and hostname under Red hat enterprise Linux 5?
A. Both Linux / UNIX comes with the following utilities to display hostname / domain name:
a) hostname - show or set the system’s host name
b) domainname - show or set the system’s NIS/YP domain name
c) dnsdomainname - show the system’s DNS domain name
d) nisdomainname - show or set system’s NIS/YP domain name
e) ypdomainname - show or set the system’s NIS/YP domain name
For example, hostname is the program that is used to either set or display the current host, domain or node name of the system. These names are used by many of the networking programs to identify the machine.
$ hostname
Output
sun521nixcraft.com
The domain name is also used by NIS/YP or Internet DNS:
$ dnsdomainname
Output:
nixcraft.com
Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
Related Other Helpful FAQs:
- Linux setting hostname and domain name of my server
- Linux change my hostname / computer system name
- OpenBSD Change Hostname
- How to test or check reverse DNS
- How To Set BIND9 With Go Daddy Registered Domain
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: active_directory, directory_domain, dnsdomainname_command, dns_domain, domain_name, domain_tools, hostname_command, internet_dns, node_name, red_hat_enterprise, UNIX, windows_server



Recent Comments
Today ~ 32 Comments
Yesterday ~ 1 Comment
Yesterday ~ 3 Comments
Yesterday ~ 2 Comments
Yesterday ~ 3 Comments