Use shell commands to stop or run the service-Service

Source: Internet
Author: User
Tags syslog
Use shell commands to stop or run services --- Service
# Service xinetd stop // stop running the xinetd service
Stopping xinetd:
# Service xinetd start // start the xinetd service
Tip: sometimes when we use Linux for Internet access, we cannot connect to the Internet. In fact, sometimes we may shut down

Close the firewall and run the following command: # service iptables stop

Configuration command for service startup status:
1. ntsysv
2. chkconfig. This command has powerful functions. Let's take a look:
View the service startup status: # chkconfig -- list [Services]
E. g .:
# Chkconfig -- list // view the startup status of all services in the system.
# Chkconfig -- list syslog // view the startup status of the syslog service.
Set the startup status of an independent service: # chkconfig -- level <runlevel list> <Serivces> <ON/OFF/Reset>
E.g .:
# Chkconfig -- level 123 syslog off // indicates that the syslog service stops running at 1, 2, and 3.

Related Article

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.