Linux Learning notes----2

Source: Internet
Author: User

Control Services and Daemons

1. Auto-start System process

system startup and server processes are managed by the SYSTEMD system and service Manager. This program provides a way to activate system resources, Server daemons, and other processes on startup and on a running system.

Daemon: is a process that performs various tasks and waits or runs in the background. In general, the daemon starts automatically at system startup and runs continuously to shutdown or is stopped manually. By convention, the name of the daemon ends with the character D.

In Red Hat 7, Process ID 1 belongs to SYSTEMD


2, Systemctl

The SYSTEMCTL command is used to manage various types of SYSTEMD objects, which they call cells.

Systemctl Querying all cell states

SYSTEMCTL-L Viewing unit complete information

Systemctl List-units Viewing the active status of all loaded units

Systemctl list-unit-files viewing enabled and disabled settings for all cells

Systemctl--failed to view only failed units

Common unit Names

. Service System Services

. Socket Socket Unit

. Path PATH Unit

View a service status information

Systemctl Status Name.type

Example: Systemctl status Sshd.service

Status Output keywords

Loaded unit configuration file has been processed

Active (running) is running through one or more persistent processes

Active (exited) has successfully completed a one-time configuration

Active (Waiting) is running, but waiting for events

Inactive not running

Enable will start at system startup

Disable does not start at system boot time

Static cannot be enabled, but can be started automatically by a unit that starts


3. Control system Service

SYSTEMCTL Command Summary

You can start and stop services on a running system, or you can enable or disable a service to start automatically when the system starts.

SYSTEMCTL Status Unit View detailed information about the status of the unit

Systemctl Stop UNIT stops a service on a running system

Systemctl start UNIT starts a service on a running system

Systemctl Restart UNIT restarts a service on a running system

Systemctl Reload UNIT Reloads the configuration file for a running service

systemctl    mask       UNIT                   &NBS p; Disable a service completely so that it cannot start manually

systemctl    unmask   UNIT       & nbsp             make shielded services available

systemctl    enable     UNIT                     To configure the service to start at system startup

systemctl    disable     UNIT                     banned services start at system startup

SYSTEMCTL list-dependencies Unit lists cell interdependencies


Linux Learning notes----2

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.