CentOS7 automatic startup command

Source: Internet
Author: User
New commands of the old task commands enable a service to automatically start chkconfig -- level3httpdonsystemct
Task Old commands New command
Enable a service automatically Chkconfig -- level 3 httpd on Systemctl enable httpd. service
Disable automatic startup of a service Chkconfig -- level 3 httpd off Systemctl disable httpd. service
Check service status Service httpd status Systemctl status httpd. service (service details)
Systemctl is-active httpd. service (only show whether it is Active)
Show all started Services Chkconfig -- list Systemctl list-units -- type = service
Start a service Service httpd start Systemctl start httpd. service
Stop a service Service httpd stop Systemctl stop httpd. service
Restart a service Service httpd restart Systemctl restart httpd. service

 

Start the nginx service

systemctl start nginx.service

Set auto-start

systemctl enable nginx.service

Stop auto-start

systemctl disable nginx.service

View current service status

systemctl status nginx.service

Restart the service

systemctl restart nginx.service

View all started Services

systemctl list-units --type=service

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.