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

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