Modify and view the linux startup service. each time the system is started, different services are started at different runlevel levels. This article will show you how to modify and view the startup service of linux. Press [CTRL] + [ALT] + [F7]/[F8] to check that the system is starting at startup... modify and view the linux startup service. each time the system is started, different services are started at different runlevel levels. This article will show you how to modify and view the startup service of linux. Press [CTRL] + [ALT] + [F7]/[F8] to view the services that are being started at system startup !!!! As we all know, Linux provides us with different startup levels in 7: 0 ~ 6. which services will be started at different startup levels. You can use chkconfig -- list to check whether the chkconfig service name -- level 3 {on | of} needs to be started or stopped at a certain level. 1. for example, to stop the sshd service at the 3rd startup levels. [Root @ team4 rc3.d] # chkconfig sshd -- level 3 off 2. you can also manually modify it in/etc/rc. d/this directory contains many directories corresponding to different runlevels, which indicate that services should be started and stopped when entering a certain startup level. 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. for local, we use the rc3.d directory as an example. the directory records the services that need to be stopped and started when init 3 is entered. The contents of the rc3.d directory are as follows: www.2cto.com [root @ team4 etc] # ls/etc/rc. d/rc3.d/K02avahi-dnsconfd K89pand S25bluetooth K02dhcdbd %s25netfs K02NetworkManager K91capi %%%s26apmd K05conman %s26hidd K indicates the service to be stopped at the startup level, number is the execution order at the stop, the service is clear later. S starts with those services. Note: first start with K and then start with S. Therefore, services starting with S will overwrite services starting with K.
Linux setup program boot and Linux services here only I know, for example, the following requirement is that I want to connect to the Linux Server using the VNC Viewer in Windows. in Linux, enter # vncserver and set the password. now I can use VNC to connect to the Linux desktop under Windows. if my Linux Server system restarts, so I have to re-run the vncserver command, so what methods do I need to enable the Linux Server to automatically start the vncserver when it is started? 1. I can set the vncserver as a system service and start it up. run the following command to check whether the vncserver is a system service # chkconfig -- list | grep vnc vncserver 0: off 1: off 2: off 3: off 4: off 5: off 6: off now we need to set vncserver to start automatically, run the following command # chkconfig -- level 5 vncserver on # chkconfig -- list | grep vnc vncserver 0: off 1: off 2: off 3: off 4: off 5: on 6: if you restart the system at this time, the vncserver will automatically get up as a service, but if you want to use vnc now, you can directly run the vncserver command www.2cto.com 2. we can write the vncserver command in the scripts to be run when Linux is started. What should I do when I start Linux? I know the following:/etc/rc. local/etc/rc. sysinit/etc/inittab/etc/profile here remember the difference and connection between Linux service and Linux startup. This article is from the fat shark network.
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