service command for SuSE

This information was taken from this URI: http://www.novell.com/coolsolutions/trench/15089.html

Software installed on a SUSE Linux system usually place startup scripts in the /etc/init.d folder. The scripts in /etc/init.d are used to start, stop, restart, and query the status of the associated service.

Red Hat users use the service command to start and stop software services. The syntax is service service_name start|stop|restart|status. Users often ask if SuSE has a service command or equivalent. Some users even go so far as to copy the service command binary from a Red Hat box and use it on the SuSE box.

Such extremes are not necessary. Even though the startup script can be evoked using its full path, for example /etc/init.d/xntpd start; the simplest way to access startup scripts is to use the rc prefix. To access a startup script from a command line, just prepend rc to the script name and pass it the appropriate start|stop|restart|status option.

For example, to start xntpd, enter the following:

linux:/boot # ls -l initrd*
#rcxntpd start
Starting network time protocol daemon (NTPD)				done

Advertisements

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s