LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1757|回复: 6

为什么命令chkconfig不能用呢?

[复制链接]
发表于 2004-5-15 16:04:06 | 显示全部楼层 |阅读模式
root@localhost wshk]# chkconfig --list mysqld
bash: chkconfig: command not found
 楼主| 发表于 2004-5-15 17:15:38 | 显示全部楼层
不只chkconfig不能用,连adduser也不能用!
root@localhost root]# adduser
bash: adduser: command not found
那位高手能帮帮我呢?
发表于 2004-5-16 03:41:51 | 显示全部楼层
需要
#/sbin/adduser
#/sbin/chkconfig

要不,你可以把/sbin,加到PATH中...
发表于 2004-5-16 03:48:21 | 显示全部楼层

回复: 为什么命令chkconfig不能用呢?

最初由 小菜刀 发表
root@localhost wshk]# chkconfig --list mysqld
bash: chkconfig: command not found


先来找找看:
#whereis chkconfig
再按照查寻的结果的绝对路径来执行命令。


最初由 小菜刀 发表
不只chkconfig不能用,连adduser也不能用!
root@localhost root]# adduser
bash: adduser: command not found
那位高手能帮帮我呢?


增加用户的命令是useradd
 楼主| 发表于 2004-5-16 08:13:54 | 显示全部楼层
谢谢各位,问题解决了,原来需要绝对路径!
 楼主| 发表于 2004-5-16 08:39:51 | 显示全部楼层
“可以把/sbin,加到PATH中”请问怎么加到PATH中呢?
发表于 2004-5-16 18:36:13 | 显示全部楼层
最初由 小菜刀 发表
“可以把/sbin,加到PATH中”请问怎么加到PATH中呢?


在终端或纯文本界面下,打开用户主目录下的.bash_profile文件

#cd
#ls -a
#vi .bash_profile

在PATH那行后面加上/sbin,用冒号分割,如

PATH=$PATHHOME/bin:/sbin


保存退出后,重新注销、登录,就可以生效了。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表