LINUX-general Linux technology-Linux technology and application information. For more information, see the following section. In the/etc/rc. d directory, there are some files starting with rcX. d, which X indicates the number indicates the running level. 0 indicates shutdown, 1-5 indicates normal, and 6 indicates restart. Therefore, if you want the system to execute a task when the system is ON/OFF, write a standard service script, put it in/etc/init. d directory, and then go to the corresponding rc. d/rcX. d directory to create a link pointing to this script, you can be executed at the corresponding running level.
In addition, you can copy some standard service scripts of the system, change them by yourself, and use the chkconfig -- add command to add them.
UBUNTU can use sudo/usr/sbin/update-rc.d sshd start 0123 stop 456 to make the sshd service run at level 0123 and stop at level 456.
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