chkconfig: command not found

chkconfig: command not found

bash: chkconfig: command not found

[root@xuniji ~]# chkconfig
bash:chkconfig: commandnotfound
[root@xuniji ~]# rpm -aq |grep chkconfig
chkconfig-1.3.30.1-2
[root@xuniji ~]# export PATH=/sbin:$PATH
[root@xuniji ~]# chkconfig
chkconfigversion 1.3.30.1 – Copyright (C) 1997-2000 Red Hat, Inc.
This may be freely redistributed under the terms of the GNU Public License.

usage: chkconfig –list [name]
chkconfig –add
chkconfig –del
chkconfig [–level ]

[root@xuniji ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/gtl/bin
[root@xuniji ~]# PATH=”$PATH”:/sbin
[root@xuniji ~]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/gtl/bin:/sbin

大功告成!!!

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

#cd
#ls -a
#vi .bash_profile

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

PATH=$PATH:$HOME/bin:/sbin

保存退出后,重新注销、登录,就可以生效了。

Leave a Comment

You must be logged in to post a comment.