“This is the 26th day of my participation in the August More Text Challenge.

The vast sea of millions, thank you for this second you see here. Hope my article is helpful to you!

May you keep your love and go to the mountains and seas in the coming days!

Linux advanced commands

Yesterday we have already configure Linux filtered and timing task of learning, know how to go through the grep command in the Linux and pipeline operator | collocation is used to search for some documents, to find the file information we need, through configuration tasks so as to achieve timing we do some time regularly, such as the output log operations such as, Of course, we learn more than that. Today we learn about Linux service management commands! Let ‘s GO!

Linux service management

A service is essentially a process that runs in the background, usually listening on a port and waiting for requests from other programs (e.g. Mysql, SHD firewall, etc.).

Service management

Command:

Sysytemctl [Option] Service name

Parameter details:

  • Start: starts the service.
  • Stop: Stops the service.
  • Status: View the service status.
  • Restart: restarts the service.
  • Reload: does not stop the timer and reloads the new configuration file to make it take effect.

Service startup

Command related:

  • SystemctI List -Units Service: Checks the running status of services
  • Systemcti list-unit-files –type=service: Queries the startup status of all services
  • Systemctl enable Service name: enables the automatic startup of a service
  • Systemctl disable Service name: disables the automatic startup of a server.
  • SystemctI IS-enabled Service name: Queries the startup status of a specified server
  • Systemctl list-unit-files Service name. service: queries the startup status of a specified server

Note:

Default service status classification:

  • Enable: enables the automatic startup

  • Disable: Starts manually

  • Daemons have other default states besides enable and disable:

    1. Static: This service cannot be started by itself, but may be woken up by other services of enable type (dependent services).
    2. Mask: This service will not be started in any case! Because it has been forcibly logged out (but not deleted), you can use systemctl unmask to change it back to the original status.

Current service status classification

  1. Active (running) : One or more programs are running in the system.
  2. Active (exited) : the service is executed only once.
  3. Active (waiting) : Indicates that something is being executed, but is waiting for something else to continue.
  4. Inactive: indicates that the service is not running.

Demonstration effect

conclusion

I believe that you are on the Linux system of powerful filtering filtering function and configuration of the function of the scheduled task have a certain understanding, looking forward to waiting for the next chapter of Linux in the advanced command of some service management commands to learn it!

Of course, there are more commands to watch next time! Welcome to the next chapter!

Let’s refuel together, too! I am not just, if there is any missing, wrong place, also welcome you to criticize in the comments of talent leaders! Of course, if this article is sure to help you a little, please kindly and lovely talent leaders to give a thumb-up, favorites, one key three even, thank you very much!

Here, the world is closed for today, good night! Although this article is over, I am still here, never finished. I will try to keep writing articles. The coming days are long, why fear the car yao ma slow!

Thank you all for seeing this! May you live up to your youth and have no regrets!