dnsdomainname

Show the system's DNS domain name. Note: The tool uses gethostname to get the hostname of the system and then getaddrinfo to resolve it into a canonical name. More information: <https://www.gnu.org/software/inetutils/manual/html_node/dnsdomainname-invocation.html>.

Install

All systems
curl cmd.cat/dnsdomainname.sh
Debian Debian
apt-get install hostname
Ubuntu
apt-get install hostname
Arch Arch Linux
pacman -S inetutils
image/svg+xml Kali Linux
apt-get install hostname
CentOS
yum install hostname
Fedora
dnf install hostname
Windows (WSL2)
sudo apt-get update sudo apt-get install hostname
OS X
brew install inetutils
Raspbian
apt-get install hostname

Show the system's DNS domain name. Note: The tool uses gethostname to get the hostname of the system and then getaddrinfo to resolve it into a canonical name. More information: <https://www.gnu.org/software/inetutils/manual/html_node/dnsdomainname-invocation.html>.

  • Show the system's DNS domain name:
    dnsdomainname

© tl;dr; authors and contributors