dwi2tensor: 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 Debian possible default full paths are:

/usr/lib/mrtrix/bin/dwi2tensor - from package: mrtrix

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