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 Name | SysVinit 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] |
MySQL | Usage : [start | stop | restart | reload | force-reload | status command : service mysql [usage] |
MariaDB | Usage : [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] |
PureFTPd | Usage : [start | stop | restart | force-reload | status] command : service pure-ftpd [usage] |
ProFTPD | Usage : [start | stop | restart | force-reload | status] command : service proftpd [usage] |
VSFTPD | Usage : [start | stop | restart | reload | status] command : service vsftpd [usage] |
Exim (Mail Service) | Usage : [start | stop | restart | reload | status] command : service exim [usage] |
Dovecot IMA | Usage : [condrestart | try-restart | start | stop | restart | reload | force-reload | status] command : service dovecot [usage] |
Send Mail | Usage : [start | stop | restart | reload | status] command : service sendmail [usage] |
Lighttpd | Usage : [start | stop | restart | reload | status] command : service lighttpd [usage] |
Nginx | Usage : [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] |
ISCSI | Usage : [start | stop | status | restart | condrestart | try-restart | reload | force-reload] command : service iscsi [usage] |
CSF | Usage : [start | stop | restart | force-reload | status] command : service csf [usage] |
LFD | Usage : [start | stop | restart | force-reload | status] command : service lfd [usage] |
NSCD | Usage : [start | stop | status | restart | reload | condrestart] command : service nscd [usage] |
FastMail | Usage : [start | stop | status | restart] command : service fastmail [usage] |
postfix | Usage : [start | stop | restart | reload | status] command : service postfix [usage] |
iptables | Usage : [start | stop | restart | condrestart | status | save | panic] command : service iptables [usage] |
qmail | Usage : [start | stop | restart | reload | status | condrestart] command : service qmail [usage] or /etc/init.d/qmail [usage] |
apf | Usage : [start | stop | restart] command : service apf [usage] or /etc/init.d/apf [usage] |
cron | Usage : [start | stop | restart | reload | status | condrestart] command : service cron [usage] or /etc/init.d/cron [usage] |
syslog | Usage : [start | stop | restart | status | condrestart] command : service syslog [usage] or /etc/init.d/syslog [usage] |
TIDAL Agent | Usage : [start | stop | status] command : [your path] tagent [usage] |
Oracle ASM | Usage : [start | stop | restart | enable | disable | configure | createdisk | deletedisk | querydisk | listdisks | scandisks | status] command : service oracleasm [usage] or /etc/init.d/oracleasm [usage] |