Linux system service Management

Source: Internet
Author: User

Chkconfig Service Management Tools

[Email protected] ~]# ls/etc/init.d/functions netconsole Network README
# Service Service Name Start|stop|restart//This is the name of these files in the/etc/init.d/directory #

Chkconfig--list lists all services and their opening status at each level, listing executable files in the/etc/init.d/directory (files with green fonts)

[Email protected] ~]# chkconfig--list Note: This output shows only SysV services and does not include native SYSTEMD services.       SysV configuration data may be overwritten by native SYSTEMD configuration.      To list the SYSTEMD service, execute ' systemctl list-unit-files '. To view the services enabled on the specific target, perform ' systemctl list-dependencies [target] '. Netconsole 0: Off 1: Off 2: Off 3: Off 4: off 5: Off 6: Off network 0: off 1: Off 2: Open 3: Open 4: Open 5: Open 6: Off

How to change the on status under a service level (boot-up status)

# chkconfig--level 2345 Network off# chkconfig Network on

How to add a service to the self-launch list

# chkconfig--add httpd# chkconfig--listhttpd 0: Off 1: Off 2: Open 3: Open 4: Off 5: Open 6: Off Netconsole 0: off 1: Off 2: Off 3: Off 4: off 5: Off 6: Off network 0: Off 1: Off 2: Open 3: Open 4: Open 5: Open 6: Off

How to remove a service from the self-launch list

# chkconfig--del httpd# chkconfig--listnetconsole 0: Off 1: Off 2: Off 3: Off 4: off 5: Off 6: Off network 0: off 1: Off 2: Open 3: Open 4: Open 5: Open 6: Off

SYSTEMD Service Management

List all the services of the system

# systemctl List-units--all--type=service

Service corresponding script file (there are many, can be categorized)

# ls/usr/lib/systemd/system/
Service//System services target//multiple unit group device//Hardware Device mount//File system mount point automount//Automatic mount point path//file or path scope//external process not initiated by Systemd SL ICE//Process group snapshot socket swap//swap file for//SYSTEMD snapshot socket//interprocess communication Timer//Timer

Each of these types of files is a unit, and it is these units that make up the various resources of the system (individual services, individual devices, etc.)

Linux system service Management

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.