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

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