【问题标题】:Error when I try to check version of Sudo on Linux Live Server via SSH当我尝试通过 SSH 检查 Linux Live Server 上的 Sudo 版本时出错
【发布时间】:2018-11-30 11:03:15
【问题描述】:

我收到了这个错误

-bash: sudo: command not found

在尝试使用以下命令检查 Sudo 版本时

sudo -V

这是它的截图:screenshotofbasherror--bash: sudo: command not found

提前致谢!

【问题讨论】:

标签: linux bash command-line sudo su


【解决方案1】:

原因可能是你没有 sudo 包。

对我来说,操作系统是 CentOS-7.2,我从 sudo rpm 包中获得了 sudo 命令。 这可以通过以下命令完成:

yum provides /usr/bin/sudo

当你输入上面的命令时,可以得到如下输出:

sudo-1.8.19p2-13.el7.x86_64 : Allows restricted root access for specified users
Repo        : base
Matched from:
Filename    : /usr/bin/sudo



sudo-1.8.6p7-17.el7_2.x86_64 : Allows restricted root access for specified users
Repo        : @updates
Matched from:
Filename    : /usr/bin/sudo

我可以查询sudo rpm包

sudo-1.8.6p7-17.el7_2.x86_64

【讨论】: