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

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

On Debian possible default full paths are:

/bin/fgconsole - from package: kbd

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