Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

What's the difference between those two commands?

/etc/rc.d/postgres start


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
up vote 3 down vote accepted

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

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


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.