To find out information about the current domain name and host name on a Linux system, you can use the hostname
command. This command displays the current hostname of the system.
To display the fully qualified domain name (FQDN) of the system, you can use the -f
flag. For example:
hostname -fSource:wtual.wwturi.com
This will output the FQDN, which includes both the hostname and the domain name.
Alternatively, you can use the domainname
command to display the current domain name. This command does not display the hostname, only the domain name.
domainname
You can also use the dnsdomainname
command to display the domain name as it is configured in the system's Domain Name Service (DNS) settings.
dnsdomainname