Linux CENTOS7 Linux Task Scheduler cron, chkconfig Tools, SYSTEMD Management Services, Unit introduction, Target Introduction

Source: Internet
Author: User

I. Linux Task Scheduler cron

Crontab-u-e-l-R

The user command of the time-sharing moon Week

File/var/spool/corn/username

Sub-range 0-59, time range 0-23, day range 0-31, month range 0-12, week 1-6

Available formats 1-5 indicates a range of 1 to 5

Available formats 1 or 2 or 3

The available format */2 represents a number divisible by 2, such as the hour, which is every 2 hours

Start

Systemctl etop Crond Stop

Systemctl Start Crond.service

Second, chkconfig tools

Chkconfig--list

Chkconfig--level 3 Network off

Chkconfig--level 345 Network off

Chkconfig--del Network

Chkconfig--add Network

Third, SYSTEMD Management services, Linux is a kind of init soft

Systemctl list-units--all--type=service

Several common service-related directives

Systemctl enable Crond.service to boot the server

Systemctl Disable Crond don't let boot start

Systemctl Status Crond View status

Systemctl Stop Crond Service

Systemctl Restart Crond Restart Service

Systemctl is-enabled Crond Check if the service is booting

Three, Unit introduction

Ls/usr/lib/systemd/system System All Unit

Service System Services

Target multiple units consisting of groups

Device hardware devices

Mount File System mount point

AutoMount Automatic mount point

Path file or path

SCOP is not an external process initiated by SYSTEMD

Slice Process Group

Snapshot Systemd Snapshot

Socket inter-process communication sockets

Swap file

Timer Timer

Unit-related instructions

Systemctl List-units lists the running unit

Systemctl list-units--all list all, including failed or inactive

Systemctl list-units--all--state=inactive List Inactive Service

Systemctl list-units--type=service List service with Active status

Systemctl is-active Crond.service See if a service is active

Four, Target introduction

The future of the system is easy to manage unit with target

Systemctl list-unit-files--type=target Specify target

Systemctl list-dependencies mulit-user.target See which unit is under the specified target

Systemctl Get-default View system default target

Systemctl Set-default Multi-user.target

A service belongs to one type of unit

Multiple Uniy make up a target

A target contains multiple service

Cat/usr/lib/systemd/system/sshd.service view [Install] section

Linux CENTOS7 Linux Task Scheduler cron, chkconfig Tools, SYSTEMD Management Services, Unit introduction, Target Introduction

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.