Linux / Unix: SysVinit Services Restart vs Reload vs Condrestart

In the SysVinit init system, which is used in many Linux and Unix distributions, there are several commands to control system services:

  1. restart: The restart command stops the service and then starts it again. This is useful when you want to apply changes to the service’s configuration.
service <service_name> restart
  1. reload: The reload command reloads the configuration of a service without stopping and starting the service. This is useful when you want to apply changes to the service’s configuration without disrupting its operation.
service <service_name> reload
  1. condrestart: The condrestart command restarts the service only if it is already running. This is useful when you want to ensure that a service is running with the latest configuration, without stopping and starting the service if it is not necessary.
service <service_name> condrestart

Note that the exact availability and behavior of these commands may vary between different distributions and init systems. In some cases, they may not be available, or they may have slightly different names or behaviors. You should consult the documentation for your specific distribution and init system for more information.

Leave a Comment