filmov
tv
Unix & Linux: Bash Sudo Command Not Found (5 Solutions!!)
![preview_player](https://i.ytimg.com/vi/MLPHum4Bnwg/maxresdefault.jpg)
Показать описание
Unix & Linux: Bash Sudo Command Not Found
The Question: 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:
sudo:
Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful
== This solution helped 5 people ==
try to use full path
/usr/bin/sudo
if that command work then include /usr/bin/ in your env variable PATH in
~/.bashrc
echo "export PATH="$PATH:/usr/bin"" >> ~/.bashrc
hopefully works ..
== This solution helped 42 people ==
Maybe it isn't installed? Open your package manager and install the sudo
package.
== This solution helped 22 people ==
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.
== This solution helped 7 people ==
First login to your root account. Then
$ apt-get install sudo
Add your existing user to group sudo
$ sudo adduser <user> sudo
You should then login as <user>, and the sudo command should be there.
The Question: 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:
sudo:
Solutions: Please watch the whole video to see all solutions, in order of how many people found them helpful
== This solution helped 5 people ==
try to use full path
/usr/bin/sudo
if that command work then include /usr/bin/ in your env variable PATH in
~/.bashrc
echo "export PATH="$PATH:/usr/bin"" >> ~/.bashrc
hopefully works ..
== This solution helped 42 people ==
Maybe it isn't installed? Open your package manager and install the sudo
package.
== This solution helped 22 people ==
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.
== This solution helped 7 people ==
First login to your root account. Then
$ apt-get install sudo
Add your existing user to group sudo
$ sudo adduser <user> sudo
You should then login as <user>, and the sudo command should be there.