dnsdomainname: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/bin/dnsdomainname - from package: net-tools

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/bin/dnsdomainname - from package: hostname

You may install the required package with command apt-get install {package}
Error in other languages:
dnsdomainname: bevel nie gevind nie
dnsdomainname: comandă negăsită
dnsdomainname: comando não encontrado
dnsdomainname: commande introuvable
dnsdomainname: command not found
dnsdomainname: käsku ei ole
dnsdomainname: không tìm thấy lệnh
dnsdomainname: komanda nerasta
dnsdomainname: Kommando nicht gefunden.
dnsdomainname: kommandot finns inte
dnsdomainname: komut yok
dnsdomainname: nie znaleziono polecenia
dnsdomainname: níor aimsíodh an t-ordú
dnsdomainname: no se encontró la orden
dnsdomainname: no s'ha trobat l'ordre
dnsdomainname: opdracht niet gevonden
dnsdomainname: parancs nem található
dnsdomainname: perintah tidak ditemukan
dnsdomainname: príkaz nenájdený
dnsdomainname: příkaz nenalezen
dnsdomainname: команда не найдена
dnsdomainname: командата не е открита
dnsdomainname: 命令找不到
dnsdomainname: コマンドが見つかりません