文章转自:

http://www.cyberciti.biz/faq/debian-ubuntu-rhel-centos-linux-bash-sudo-command-not-found/

安装sudo

$ su -

and install sudo

apt-get install sudo

修改sudo

sudo vi /etc/sudoers

安装红色的那一行,添加一个用户

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults| env_reset
Defaults| mail_badpass
Defaults| secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" # Host alias specification # User alias specification # Cmnd alias specification # User privilege specification
root| ALL=(ALL:ALL) ALL # Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL # Allow members of group sudo to execute any command
%sudo| ALL=(ALL:ALL) ALL # See sudoers() for more information on "#include" directives: #includedir /etc/sudoers.d

-bash: sudo: command not found Error and Solution的更多相关文章

  1. win-sudo插件解决Git bash 执行脚本报错问题 bash: sudo: command not found

    Windows git bash 默认没有sudo命令,可以添加win-sudo插件实现该功能 curl -s https://raw.githubusercontent.com/imachug/wi ...

  2. 【ERROR】bash: vim: command not found的解决办法

    今天在学习鸟哥的菜的时候,发现自己linux不可以启用vim命令,错误为:bash: vim: command not found. 机器环境:VMWare8+RED HAT Enterprise5 ...

  3. /bin/bash: [xxxx]: command not found

    /******************************************************************************** * /bin/bash: [xxxx ...

  4. -bash: pod: command not found

    OS X 系统没升级之前用的 cocoapods 一点儿问题都没有,但是升级成版本10.11.4 OS X EI Capitan之后,在终端除了cd 指令可以用之外,其他任何指令输入都是提示-bash ...

  5. CocoaPod出现-bash: pod: command not found 解决办法

    从过年来到公司  就不用自己电脑了    之前一直自己带电脑   昨天随便建了一个demo   使用cocoapods  发现     -bash: pod: command not found 刚开 ...

  6. RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found

    RedHat中敲sh-copy-id命令报错:-bash: ssh-copy-id: command not found 在多台Linux服务器SSH相互访问无需密码, 其中进入一台Linus中,对其 ...

  7. 升级10.11后使用CocoaPod出现-bash: pod: command not found 解决办法-备

    升级10.11后,运行pod命令出现: -bash: pod: command not found 解决办法: sudo gem install -n /usr/local/bin cocoapods ...

  8. centos7 (ifconfig不能使用) -bash: ifconfig: command not found

    [root@localhost ~]# ifconfig -bash: ifconfig: command not found 输入ip addr 确认IP地址是否设置正常,设置好如下所示,如果没有获 ...

  9. 解决mac安装homebrew后报错-bash: brew: command not found

    解决mac安装homebrew后报错-bash: brew: command not found     参照官网上很简单的一句安装命令, /usr/bin/ruby -e "$(curl ...

随机推荐

  1. oracle数据库开启的时候 是先开监听还是先开主服务,关数据库的时候呢???

    启动的时候无所谓先后,关闭的话 1.首先是关闭监听(让远程客户端无法再连进来):2.发出一个系统检查点,让数据文件和控制文件的系统修改号统一:(alter system checkpoint;)3.s ...

  2. 修改ftp端口为50021

    1. 配置 2. 增加防火墙规则 netsh firewall set portopening tcp 50021 ftp-50021 enable 3. 重启服务 net stop FileZill ...

  3. BZOJ2005 莫比乌斯反演

    题意:http://www.lydsy.com/JudgeOnline/problem.php?id=2005 实际上把这些被挡住的点的坐标和能量值列举出来可以发现有个公式: “对于坐标系第一象限任意 ...

  4. ecshop /includes/init.php Arbitrary User Login Vul

    catalog . 漏洞描述 . 漏洞触发条件 . 漏洞影响范围 . 漏洞代码分析 . 防御方法 . 攻防思考 1. 漏洞描述 对用户输入的cookie,判断免登的逻辑中存在漏洞,导致黑客可以直接通过 ...

  5. Multiples of 3 and 5

    #include<stdio.h> int main(void){ int n1, n2,n3; n1=333*(3+999)/2; n2=199*(5+995)/2; n3=66*(15 ...

  6. List<List<String>>

    package list; import java.util.ArrayList; import java.util.List; public class MyList { public static ...

  7. yield和python(如何生成斐波那契數列)

    您可能听说过,带有 yield 的函数在 Python 中被称之为 generator(生成器),何谓 generator ? 我们先抛开 generator,以一个常见的编程题目来展示 yield ...

  8. AngularJs 键盘事件和鼠标事件

    ngKeydown/ngKeypress/ngKeyup 该指令在按键按下/按键按下/按键松开时执行指定表达式. ngKeydown和ngKeypress略有不同,目前的测试是ngKeypress针对 ...

  9. Python基本数据类型之str

    一.创建 s = "morra" s = str("morra") #str()这种方法会自动找到str类里的_init_方法去执行 ------------- ...

  10. SSH 学习总结-01 SSH整合环境

    一 Struts2+Spring3+Hibernate4+Maven 整合环境 1 开发工具 1)JDK下载地址:http://www.oracle.com/technetwork/java/java ...