Each time the system is powered on, different services are started depending on the runlevel level.
As we all know, Linux provides us with 7 different startup levels 0~6, so different startup levels start those services. You can use Chkconfig--list to view that you can use the Chkconfig service name--level 3 {on|of} to modify whether to start or stop at a certain level.
1. For example: To stop the sshd service at the 3rd boot level.
[Root@team4 rc3.d]# chkconfig sshd--level 3 off
2. It can also be manually modified, in the/etc/rc.d/directory, there are many different runlevel corresponding directories, which indicate the level of entry to start and stop those services.
For example:
[Root@team4 etc]# ls/etc/rc.d init.d rc0.d rc2.d rc4.d rc6.d rc.sysinit rc rc1.d rc3.d rc5.d rc.local We use the directory of RC3.D for example, this directory Inside the record is entered Init 3 o'clock need to stop and start those services. The following is the contents of the RC3.D directory: [root@team4 etc]# ls/etc/rc.d/rc3.d/k02avahi-dnsconfd k89pand s25bluetooth k02dhcdbd K89rdisc-S25netfs K 02NetworkManager k91capi s25pcscd k02networkmanagerdispatcher k99readahead_later s26apmd K05conman S04readahead_early S26hidd
The beginning of K represents the service that the startup level needs to stop, and the number is the order of execution when it stops, and then the service is clear.
s starts with those services.
Note: Start with K first, followed by execution S. So the service at the beginning of S will overwrite the service at the beginning of K.