Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

What's the difference between those two commands?

/etc/rc.d/postgres start

and

rc.d postgres start

Aren't those interchangeable?

I tried starting PostgreSQL using the latter, but it only works with the first one.

I'm using Sys V init on Arch Linux.

share|improve this question
    
What distribution are you running? What init system are you using (if you don't understand this bit, we'll assume the default)? There are multiple service management systems under Linux, and the commands to start and stop services are different. –  Gilles Jul 9 '11 at 22:07
    
@Gilles Sys V init on Arch Linux. –  Mahmoud Hossam Jul 9 '11 at 22:39

1 Answer 1

up vote 3 down vote accepted

It would appear that you have your your syntax a bit backwards.

rc.d                                                                                
usage: rc.d action daemon ...

e.g: rc.d list
     rc.d help
     rc.d start sshd gpm

So you would want to do

rc.d start postgresql

The rc.d script is simply for convenience. It makes starting multiple services from the command line easier. So you can do things like

rc.d start lighttpd postgresql

Instead of manually having to call both like

/etc/rc.d/lighttpd start
/etc/rc.d/postgresql start
share|improve this answer
    
oh, that must be it, sorry about that. –  Mahmoud Hossam Jul 10 '11 at 0:17

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.