I check the status of the vncserver program and found it to be available in both:

/etc/init.d/vncserver and /etc/rc.d/init.d/vncserver

Both works, but which one is the "real" one?

link|improve this question
This is not a programming related question and should be closed/moved. – Anders Jul 21 '10 at 11:15
1  
Why do people vote to move everything vaguely related to Linux to ServerFault? This is clearly a question for SuperUser. – Tyler McHenry Jul 21 '10 at 11:55
feedback

migrated from stackoverflow.com Jul 21 '10 at 16:17

This question came from our site for professional and enthusiast programmers.

3 Answers

The "real" one is /etc/init.d/<<script>> since rc.d is for the system startup.

You can also use service vncserver start

Edit: in some linux distribs, rc.d doesn't exist as it in /etc

$ ls /etc/rc
rc0.d/    rc1.d/    rc2.d/    rc3.d/    rc4.d/    rc5.d/    rc6.d/    rc.local  rcS.d/
link|improve this answer
Interesting, but looks like I don't have the service program on the linux machine :-( $service vncserver status bash: service: command not found – sunny8107 Jul 21 '10 at 11:45
1  
It's usually in /sbin, which will be in your path if you log in as root. If you just su / sudo you'll need to do /sbin/service vncserver. Or your distro might not provide one - it's definitely there in RHEL/Fedora/CentOS – Rup Jul 21 '10 at 11:58
Yep, /sbin/service indeed! Thx – sunny8107 Jul 21 '10 at 12:29
feedback

In Red Hat based distributions, /etc/init.d is a symbolic link to /etc/rc.d/init.d, so both listings actually refer to the same exact file.

link|improve this answer
You are right! ls -l /etc/init.d lrwxrwxrwx 1 root root 11 Aug 22 2007 /etc/init.d -> rc.d/init.d – sunny8107 Jul 21 '10 at 11:44
@deesto Thanks - you're right, most of my experience is with Red Hat / Fedora / CentOS, but I had thought that was common beyond Red Hat. I realise Ubuntu is widely used nowadays and they like to do everything different though! – Rup Apr 25 at 11:09
feedback

Realone is a /etc/rc.d/init.d/vncserver

link|improve this answer
feedback

Your Answer

 
or
required, but never shown