I\'m creating an android app that sends commands to a linux terminal on a device. I am able to get the proper output when using the \"ls\" command, however the device does n
Your server/shell is misconfigured somehow. It does not set the PATH
correctly, when a shell session is not started. That's, why the ifconfig
/iwconfig
binaries cannot be found.
Either fix your startup scripts to set the PATH
correctly for all situations. Or use a full path to the ifconfig
/iwconfig
.
To find the full path, open a regular shell session using your SSH client and type:
which ifconfig
For a similar issue, see Certain Unix commands fail with "... not found", when executed through Java using JSch.