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