Domain Name Linux Command. Keep in mind that in order to change etchostname file we require root privileges which can be get with the sudo command. By default it prints a line that includes the following information.
Both Linux UNIX comes with the following utilities to display hostname domain name. Hostname -f shows your FQDN. See how to configure Linux as a dns client.
This guide will help you understand and use the Linux dig command.
See how to configure Linux as a dns client. -F --file filename Read the new host name from the specified file. Domainname -h domainname -a or alias. Keep in mind that in order to change etchostname file we require root privileges which can be get with the sudo command.