Home  >  Article  >  Operation and Maintenance  >  What is the linux service restart command?

What is the linux service restart command?

藏色散人
藏色散人Original
2023-03-28 10:05:067461browse

The Linux restart service command is "restart"; in Linux, restart means restarting, that is, you need to stop first, and then start; use syntax such as "service sshd restart" to reload the configuration file of the sshd service Or restart the sshd service.

What is the linux service restart command?

#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.

What is the Linux service restart command?

Linux service restart and reload

In Linux operating system service management, restart and reload are often encountered.

What is the difference between these two parameters? Now I will briefly talk to you.

In the learning environment, we often use the restart parameter to restart the service, but it may not be reasonable in the production environment.

restart: It means restarting. As the name suggests, you need to stop first and then start.

reload: The meaning is not reloaded, as the name implies, it is reloading (configuration).

Let’s briefly talk about the sshd service:

We have modified the configuration file of the sshd service, and now we need to reload the configuration or restart

service sshd restart:

If the changed configuration is wrong and you execute this command, stop will definitely succeed; but start will not start; if the device is in a far away computer room, this will undoubtedly cause problems for the operator. Maintenance work increases the burden; even if there is no problem with the configuration, starting and stopping the service will cause the service to stop temporarily.

service sshd reload:

Reload means reloading the configuration. First, reload will not affect the session that has been established by the current service, but will directly load the new configuration. When a new session is generated, the configuration of the new information will be used; even if the configuration file is incorrect, the result will only be a failure to load the configuration and has nothing to do with the services provided.

Recommended learning: "linux video tutorial"

The above is the detailed content of What is the linux service restart command?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Previous article:What is linux ldconfigNext article:What is linux ldconfig