Linux (16) service Management

Source: Internet
Author: User

16.1 Introduction

Service is the essence of the process, but is running in the background, usually listen to a port, waiting for other programs, such as (mysql,sshd, firewalls, etc.), so we are called daemons, is a very important knowledge point in Linux.

16.2 Service Management directives:

Service Name Start|stop|restart|reload|status

No service is used after Centos7.0, but Systemctl

16.3 Use Cases

(1) View the status of the current firewall, turn off the firewall and restart the firewall.


(2) When the firewall is turned off or enabled, it takes effect immediately. Telnet tests a port.


The WIN10 system turns off the Telnet client by default, and we just need to enable this Windows feature.




(3) This is only a temporary effect, when the system is restarted, but also to return to the previous set of services.

If you want to set a service to start or close permanently, use the CHKCONFIG directive

16.4 View service Name

Mode 1: You can see it by using setup and then selecting System Services.




Mode 2:/etc/init.d/Service Name


16.5 operating level of the service

There are 7 operating levels for Linux systems: 3 and 5 are commonly used.

The process description of the boot:


16.6 chkconfig directive

Description: The Chkconfig command allows you to set the individual run levels of each service from startup, shutdown

(1) View service




(2) Chkconfig--level 5 service name on/off

Shuts down the SSHD service at run Level 5 and then starts


Usage Details: Chkconfig After the service has been restarted or shut down, it will need to restart the machine reboot to take effect.

Linux (16) service Management

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.