tree: 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/tree - from package: tree

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

On Debian possible default full paths are:

/usr/bin/tree - from package: tree

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