Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

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

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

    
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
    
This depends on your RC and Linux distribution. –  Tom Wijsman Jul 17 '12 at 17:58

3 Answers 3

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/
share|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

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.

share|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 '12 at 11:09

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

share|improve this answer

Your Answer

 
discard

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