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

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

On Debian possible default full paths are:

/usr/bin/whoami - from package: coreutils

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