Article Title: Ubuntu service management. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
URedhat provides the chkconfig command to manage the services enabled/disabled by the system at different running levels: chkconfig ServiceName on/off and can use chkconfig -- list (two bars) view the current status.
Ubuntu does not have this command. In fact, you can simply manage system services without any command. You can change/etc/rc *. d (* values are from 0 to 6 and S) to manage the service. for example, if you do not want KDM to be automatically started, you can: sudo find/etc/rc *-name * kdm *-exec rm {} \; that is, delete all KDM startup scripts.
Ubuntu also provides another simple command for management. However, the service must already exist in the/etc/init. d directory. For example:
Add a service: sudo update-rc.d ServiceName ults
Delete A service: sudo update-rc.d ServiceName remove
You can also install another powerful tool: sudo apt-get install sysv-rc-conf sysvconfig
Startup: sudo sysv-rc-conf allows you to configure the startup status of each service at different levels.
To start a service at any time, you can: sudo/etc/init. d/ServiceName start
For example, to log on remotely, use the ssh service sudo/etcinit. d/ssh start (other systems may be sshd)
You can also perform other operations: start the service stop: stop the service restart: Close the service, and then restart reload: so that the server does not restart and re-reads the configuration file status: the current status of the service provider condrestart: if the service is locked, This will shut down the service and start the service again. Next, let's talk about the linux running level: Usually there are several runlevels: runlevel system state 0 halt the system 1 single user mode 2 basic multi user mode 3 multi user mode 5 multi user mode with gui 6 reboot the system S single user mode runlevel command to view the current running level. the init command changes the current running level.