Fedora Service Command Issue.

Today When i was using having root i typed service httpd start .it showed an error Message.

bash: service: command not found

I was Wondered when yesterday i have done the same thing ,it  had started normally ,what was the reason for that,i have googled and found the appropriate reason for that.

I Finally made to the conclusion that i have done the wrong thing today.

 What was that ?

i typed

[Puneet@localhost ~]$ su

password :

[root@localhost ~]# service httpd start

which i dont have to do so ,it Consistently giving me the same error..

bash: service: command not found

The main reason for that is i have to run su – instead of simply su .

Correct One. : –

[Puneet@localhost ~]$ su –

password :

[root@localhost ~]# service httpd start
Starting httpd:                                            [  OK  ]

If you are using su, remember the ‘-‘ option to get the target user’s environment (make it a login shell). Otherwise, you are running with your PATH, instead of root’s PATH, and the privileged commands will not be found (/sbin/ is not part of a normal user’s command search PATH).

This Solved the Issue.

Thanks to macemoneta .

🙂

4 Responses to “Fedora Service Command Issue.”

  1. alehandro Says:

    no comment keep working

  2. samy Says:

    i reach 1000 friends in orkut

    i need to add more then 1000 friends

    send the replay

    to samys0@hotmail.com

    this is more helpful to to orkut members

  3. Abhishek Agrawal Says:

    Thanks Puneet,
    I was wondering the same thing why service command is not running in fedora. Not only httpd, but others as well could not be started.

    Now its simple

  4. Hoolio Says:

    Thanks man!

    just wondered the same thing…would have taken me hours to find this one out.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: