-bash: sudo: command not found Error and Solution

文章转自:

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(5) for more information on "#include" directives:

#includedir /etc/sudoers.d
时间: 2024-09-27 23:19:19

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

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

今天在学习鸟哥的菜的时候,发现自己linux不可以启用vim命令,错误为:bash: vim: command not found. 机器环境:VMWare8+RED HAT Enterprise5 解决方法: 发现问题的根源在于没有安装好vim 输入 rpm -qa|grep vim 命令, 如果 vim 已经正确安装,会返回下面的三行代码: 1 [[email protected] ~]# rpm -qa |grep vim 2 vim-minimal-7.0.109-6.el5 3 vim

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

/******************************************************************************** * /bin/bash: [xxxx]: command not found * 说明: * 本文主要是记录android编译过程中遇到的编译错误. * * 2016-5-21 深圳 南山平山村 曾剑锋 ******************************************************************

-bash: yarn: command not found/-bash: cnpm: command not found

-bash: cnpm: command not found-bash: yarn: command not found-bash: xxxx: command not found如上yarn/cnpm皆通用,前提是安装成功后报这个错误哈! Error: EACCES: permission denied, mkdir 错误的同学请移步这篇文章 ??https://www.cnblogs.com/niceyoo/p/11703560.html 不同于Windows,我们使用了 sudo npm

Linux bash: scp: command not found的问题记录

1,scp报错 [[email protected] soft]# scpjdk-7u55-linux-x64.tar.gz 192.168.121.246:/soft/ [email protected]'s password: bash: scp: command not found lost connection [[email protected] soft]# 2,调试-v [[email protected] soft]# scp -vjdk-7u55-linux-x64.tar.g

cocoapods 在10.11下运行pod命令报-bash: pod: command not found

系统是10.11,在运行pod命令是报:-bash: pod: command not found,于是开始找办法解决. 先试了试第一种方案. sudo gem install -n /usr/local/bin cocoapods 运行成功,但还是会报command not found 不得已再试另一种方法. $ mkdir -p $HOME/Software/ruby $ export GEM_HOME=$HOME/Software/ruby $ gem install cocoapods

Mac 执行 gulp 报错 -bash: gulp: command not found

在mac系统下安装gulp,之后执行gulp 报如下错误: -bash: gulp: command not found 回溯安装过程发现问题如下 1.执行 npm root: Applications/XAMPP/xamppfiles/htdocs/gulp/node_modules 以上路径说明npm只安装到了本地目录,需要执行如下命令更改npm目录: npm config set prefix /usr/local 再执行:npm root  结果:usr/local/lib/node_m

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

从过年来到公司  就不用自己电脑了    之前一直自己带电脑   昨天随便建了一个demo   使用cocoapods  发现     -bash: pod: command not found 刚开始还以为是哪里路径错了.    后来上网搜了一下         运行一下 这段代码  就可以了. 在终端输入 如下命令:sudo gem install -n /usr/local/bin cocoapods  

-bash: pod: command not found 解决办法

问题: 运行pod命令出现:-bash: pod: command not found  解决方案: 在终端输入:sudo gem install -n /usr/local/bin cocoapods 然后 pod 命令就可以使用了...

React Native 开发环境安装和配置使用报错: -bash: react-native: command not found

[React  Native 开发环境安装和配置:-bash: react-native: command not found 报错: 前提是安装homebrew,node.js ,npm ,watchman,flow都成功.React  Native 开发环境安装和配置 执行react-native init TestProject 命令 创建demo时报错:-bash: react-native: command not found 报错提示:Please include the follo