Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have set up a VM using turnkey linux redmine and I'm trying to SSH into the server to install some more items.

It doesn't appear to be recognizing the sudo command. Every time I try to sudo something I get an error saying:

 -bash: sudo: command not found

I read somewhere else to type 'whereis sudo' and the output was:


Not sure what that does, but im hoping it might help in the diagnostic :-)

Thanks for your help, Adam

share|improve this question

migrated from askubuntu.com Oct 29 '11 at 21:21

This question came from our site for Ubuntu users and developers.

up vote 11 down vote accepted

It looks from http://www.turnkeylinux.org/redmine like Redmine, unlike Ubuntu, does not use sudo by default. What username are you using to SSH in? If it's root, then you don't need to use sudo, as everything you do when SSHed in to the Redmine system is done as root. If it's something else, like admin, then you could try using the su command to get a root shell in which to run commands as root.

share|improve this answer

Maybe it isn't installed? Open your package manager and install the sudo package.

share|improve this answer
It wasn't installed! Thanks. I'm pretty new to Linux and just assumed it was on all installations. Do i just need the sudo package or sudo-ldap as well? – Adam Oct 29 '11 at 17:14
You don't need the sudo-ldap package. Sudo works fine on my computer and I don't have sudo-ldap installed. – Azendale Oct 29 '11 at 17:20

try to use full path


if that command work then include /usr/bin/ in your env variable PATH in ~/.bashrc

echo "export PATH="$PATH:/usr/bin"" >> ~/.bashrc

hopefully works ..

share|improve this answer
That's very unlikely to be the problem; /usr/bin is almost certainly going to be in your default path. The problem, as indicated by other answers and comments, is that the sudo command wasn't installed at all. – Keith Thompson Oct 29 '11 at 22:25

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.