Linux – /etc/init.d/ or /etc/rc.d/init.d/

linux

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?

Best Answer

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/
Related Question