bash: service: command not found 错误的解决方法
来源:互联网 发布:如何查看网卡mac地址 编辑:程序博客网 时间:2024/06/06 23:57
转载】
今天碰到一个问题,问题如下:
在启动named服务时,出现下面错误提示:
bash: service: command not found
于是我到网上去一搜了一下, 发现提问的人蛮多的,但真正回答的却很少,或就是胡编乱造的,回答的多说是PATH有问题,但有什么问题呢?他们也没说清楚。
我觉得原因是这样的,service命令是要用ROOT用户来执行的,而出错的用户是用su root切换到ROOT用户下,这个命令没有也不会把环境带过去!用如下命令就不会出错了:
su - root
注意:su 后面是一个空格,横线后面也是一个空格,千万不能省略.
很简单,但是很实用!呵呵! 0 0
- bash: service: command not found 错误的解决方法
- bash: service: command not found 错误的解决方法
- bash: service: command not found 错误的解决方法
- bash: service: command not found 错误的解决方法
- bash: service: command not found 错误的解决方法
- bash: service: command not found(service命令未找到的) 错误的解决方法
- -bash: pecl: command not found的解决方法
- -bash: pecl: command not found的解决方法
- bash: mail: command not found的解决方法
- bash scp command not found的解决方法
- bash: service: command not found
- bash: service: command not found
- bash: service: command not found
- bash: service: command not found
- bash: service: command not found
- bash: service: command not found
- bash command not found解决方法
- bash:command not found解决方法
- 配置vsftpd
- Java实现辩论赛计时
- 数据库原理与设计课后作业——习题九
- RedHat5.5配置
- 程序员的级别
- bash: service: command not found 错误的解决方法
- LRUCache源码学习
- yum的错误
- C++标准库之Unities-笔记2
- UVa 10622 - Perfect P-th Powers(数论)
- Grammar API
- Java实现网页截屏
- 动漫推荐之东京暗鸦
- Linux系统命令缩写