xhost: 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:

/usr/bin/xhost - from package: xorg-x11-server-utils

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

On Debian possible default full paths are:

/usr/bin/xhost - from package: x11-xserver-utils

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