Ubuntu Service Management

Source: Internet
Author: User
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.

  

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.