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

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

On Debian possible default full paths are:

/usr/bin/bamToBed - from package: BEDTools

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