How to use Service commands on SysVinit Linux Systems

SysVinit is traditional & mother of init system which is the first process get started by kernel and holding PID 1. All the services is available on “/etc/init.d/” folder. If you want to start, stop, restart, enable, reload & status of the service follow the below commands to do it. Make sure you should have root or sudo Permission to run the below commands. Here I have covered all the services commands such as Apache, MySQL, MariaDB, Bind (Named, Bind9), Nginx, Lighttpd, Exim, Postfix, Sendmail, Qmail, etc..

We can use two different ways to interact the services in Linux, service [daemon] [usage] or /etc/init.d/[daemon] [usage]

Service NameSysVinit Commands
Apache (DEP Systems)Usage : [start | stop | graceful-stop | restart | reload | force-reload | start-htcacheclean | stop-htcacheclean]
command : service apache2 [usage]
Apache (RPM Systems)Usage : [start | stop | graceful-stop | restart | reload | force-reload | start-htcacheclean | stop-htcacheclean]
command : service httpd [usage]
MySQLUsage : [start | stop | restart | reload | force-reload | status
command : service mysql [usage]
MariaDBUsage : [start | stop | restart | reload | force-reload | status]
command : service mysql [usage]
Network (DEB Systems)Usage : [start | stop | status | restart | reload | force-reload]
command : service networking [usage]or service network-manager [usage]
Network (RPM Systems)Usage : [start | stop | status | restart | reload | force-reload]
command : service network [usage]
OpenSSH (DEB Systems)Usage : [start | stop | restart | reload | force-reload | condrestart | try-restart | status]
command : service ssh [usage]
openSSH (RPM systems)Usage : [start | stop | restart | reload | force-reload | condrestart | try-restart | status]
command : service sshd [usage]
cPanel (Hosting Control Panel)Usage : [start | stop | restart | status]
command : service cpanel [usage]
PureFTPdUsage : [start | stop | restart | force-reload | status]
command : service pure-ftpd [usage]
ProFTPDUsage : [start | stop | restart | force-reload | status]
command : service proftpd [usage]
VSFTPDUsage : [start | stop | restart | reload | status]
command : service vsftpd [usage]
Exim (Mail Service)Usage : [start | stop | restart | reload | status]
command : service exim [usage]
Dovecot IMAUsage : [condrestart | try-restart | start | stop | restart | reload | force-reload | status]
command : service dovecot [usage]
Send MailUsage : [start | stop | restart | reload | status]
command : service sendmail [usage]
LighttpdUsage : [start | stop | restart | reload | status]
command : service lighttpd [usage]
NginxUsage : [start | stop | restart | reload | status | configtest]
command : service nginx [usage]
BIND DNS (DEB Systems)Usage : [start | stop | status | restart | try-restart | reload | force-reload]
command : service bind9 [usage]
BIND DNS (RPM Systems)Usage : [start | stop | status | restart | try-restart | reload | force-reload]
command : service named [usage]
ISCSIUsage : [start | stop | status | restart | condrestart | try-restart | reload | force-reload]
command : service iscsi [usage]
CSFUsage : [start | stop | restart | force-reload | status]
command : service csf [usage]
LFDUsage : [start | stop | restart | force-reload | status]
command : service lfd [usage]
NSCDUsage : [start | stop | status | restart | reload | condrestart]
command : service nscd [usage]
FastMailUsage : [start | stop | status | restart]
command : service fastmail [usage]
postfixUsage : [start | stop | restart | reload | status]
command : service postfix [usage]
iptablesUsage : [start | stop | restart | condrestart | status | save | panic]
command : service iptables [usage]
qmailUsage : [start | stop | restart | reload | status | condrestart]
command : service qmail [usage] or /etc/init.d/qmail [usage]
apfUsage : [start | stop | restart]
command : service apf [usage] or /etc/init.d/apf [usage]
cronUsage : [start | stop | restart | reload | status | condrestart]
command : service cron [usage] or /etc/init.d/cron [usage]
syslogUsage : [start | stop | restart | status | condrestart]
command : service syslog [usage] or /etc/init.d/syslog [usage]
TIDAL AgentUsage : [start | stop | status]
command : [your path] tagent [usage]
Oracle ASMUsage : [start | stop | restart | enable | disable | configure | createdisk | deletedisk | querydisk | listdisks | scandisks | status]
command : service oracleasm [usage] or /etc/init.d/oracleasm [usage]

About Magesh Maruthamuthu

Love to play with all Linux distribution

View all posts by Magesh Maruthamuthu

Leave a Reply

Your email address will not be published. Required fields are marked *