LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Why do I get "bash: chkconfig: command not found" when I try to run chkconfig? (https://www.linuxquestions.org/questions/fedora-35/why-do-i-get-bash-chkconfig-command-not-found-when-i-try-to-run-chkconfig-342262/)

non-thrash 07-11-2005 06:21 PM

Why do I get "bash: chkconfig: command not found" when I try to run chkconfig?
 
I'm running FC3, trying to get automatic updates set up. I want to set up the yum daemon to be turned on. When I try to run chkconfig I get this:

"# chkconfig --level 345 yum on
bash: chkconfig: command not found"

Why?

homey 07-11-2005 10:57 PM

You could run a couple of commands to see if you have it installed.
For example:
# rpm -qa |grep chkconfig
chkconfig-1.3.11.1-1

# whereis chkconfig
chkconfig: /sbin/chkconfig /usr/share/man/man8/chkconfig.8.gz

WhatsHisName 07-11-2005 11:30 PM

Are you trying to run chkconfig as a regular user?

Try:

su -

and then

chkconfig ...

non-thrash 07-14-2005 08:34 AM

I did:
# rpm -qa |grep chkconfig
and got back:
chkconfig-1.3.11.1-1

I also did:
# whereis chkconfig
and got back:
chkconfig: /sbin/chkconfig /usr/share/man/man8/chkconfig.8.gz

Why do I still get:
bash: chkconfig: command not found

doublejoon 07-14-2005 02:05 PM

Like "WhatsHisName" said

either type su - to use full root environment path or type /sbin/chkconfig if you type su without the "-". That should work for you

non-thrash 07-14-2005 03:24 PM

Thanks!
 
Thanks for the clarification on su -
That's what it was, it works now!

babyofN 05-13-2007 11:27 PM

sorry, but i do not use commands: useradd (bash: useradd: command not found), or chkconfig (bash: chkconfig: command not found).
Quote:

Try:

su -

and then

chkconfig ...
I try, but not work, please 4me a concrete example

blkcamarozr28 05-14-2007 12:56 AM

The problem is there is not path to those files from the normal linux user. You have to su or login as root or add the paths to those commands. If its complicated for you try logging in as root and running those commands. :)

babyofN 05-14-2007 03:46 AM

Thanks, I see ^^

afaaro 05-15-2010 01:48 PM

This has helped me [ /sbin/chkconfig httpd on ]

JD50 05-20-2010 12:31 PM

Quote:

Originally Posted by afaaro (Post 3969841)
This has helped me [ /sbin/chkconfig httpd on ]

wtf? This is a 5 year old thread.


All times are GMT -5. The time now is 02:18 AM.