bash can't find sudo command on friendlyarm

0

I'm trying to work with this friendlyarm 9 board I got recently but it can't find some basic bash commands and I couldn't find a solution for it anywhere. When I type any command with sudo or even when I type sudo alone I get

/bin/sh: sudo: not found

It is the same when I type bash:

/bin/sh: bash: not found

Should I add something to its PATH? or anything like that?

I asked it here cause I thought it's a linux problem. If it's not can you tell me where to ask about it?

Thank you

soroosh.strife

Posted 2013-06-06T08:05:05.863

Reputation: 135

Can you find the sudo binary? By the way, maybe it's better to ask this on [SE] – fedorqui – 2013-06-06T08:06:41.617

where is its binary? – soroosh.strife – 2013-06-06T08:09:23.897

Usually in /usr/bin/sudo – fedorqui – 2013-06-06T08:09:47.677

1Usually, but not necessarily. It might be installed anywhere else, if at all. Note that friendlyarm probably doesn't house a complete desktop linux installation and so might not have all commands installed that you are used to. You can use su instead to gain superuser powers (if you aren't root already) and you can use whatever shell is available. There's not only bash. – blubberdiblub – 2013-06-06T08:11:46.690

no it's not there, I tried find sudo. but it didn't find anything – soroosh.strife – 2013-06-06T08:11:52.063

i tried su, but it get permission denied error for the bash script i wanna lunch – soroosh.strife – 2013-06-06T08:12:55.897

1Also try to login as root directly by whatever means you use to login into the board. – blubberdiblub – 2013-06-06T08:14:19.473

1Also note that su is called differently in comparison to sudo. sudo test.sh would translate to su -c test.sh. And you have to give the root password to su if you don't specify a different user. In contrast, on several desktop distros, sudo is configured to ask for the calling user's password instead by default. – blubberdiblub – 2013-06-06T08:30:23.710

su -c test.sh also gets permission denied. what's wrong with this? the bash file contains some export commands and one "exec" which is supposed to lunch my application – soroosh.strife – 2013-06-06T08:35:10.477

1

It's hard to diagnose your problem without the exact circumstances when it prints the error message. Did su ask you for a password at all? If not, it probably lacks the necessary permissions to be executed by non-root users (Try changing them as root). Also, since it's not a programming question, I'd consider Unix & Linux more appropriate.

– blubberdiblub – 2013-06-06T08:42:48.230

let us continue this discussion in chat

– soroosh.strife – 2013-06-06T08:50:03.807

Answers

1

it seems this version of linux im using doesn't support some bash commands and thus i didn't need them. getting permission denied was a result of the script not having executable permissions. Thanx to blubberdiblub I set the permissions for it to run.

soroosh.strife

Posted 2013-06-06T08:05:05.863

Reputation: 135

1You seem to be running bin/sh, which might not be a bash shell at all. Maybe the title should be "My shell can not find the command "sudo" or "bash" ". – Hennes – 2013-06-06T09:41:57.607

Also remember that sudo is not a standard app, it is standard in the Debian world, not in Linux in general. It is definitely not a bash command and it is not strange not to find it installed by default. – terdon – 2013-06-06T11:14:02.707