Home>Article>Operation and Maintenance> How to delete services under linux
Methods to delete services: 1. Use the "service service name stop" command to stop the service; 2. Use the "rm -rf..." command to clean up process resources (such as installation files); 3. Use "chkconfig –del service name” command to delete the specified service; 4. Delete the service startup file.
#The operating environment of this tutorial: linux5.9.8 system, Dell G3 computer.
Delete the service under Linux
1 Stop the service
[root]# service my_service stop
2 Clean up the process Resources (such as installation files)
[root]# cd /usr/sbin [root]# rm -rf my_service_file
3 Delete services
Note: The purpose is to clean up the soft links of the service startup files. Update startup resources.
Usage syntax:
chkconfig [--add][--del][--list][系统服务] 或 chkconfig [--level <等级代号>][系统服务][on/off/reset]
Parameter usage:
-add Add the specified system service so that the chkconfig command can manage it and at the same time Add relevant data to the system startup narrative file.
–del Delete the specified system service, which is no longer managed by the chkconfig command, and delete related data in the system startup narrative file.
–level 79b54fc81417b7ebf6e766eeb15687d3 Specifies the execution level in which the reading system service should be turned on or off.
Usage example:
chkconfig –list 列出所有的系统服务; chkconfig –add httpd 增加httpd服务; chkconfig –del httpd 删除httpd服务
4 Delete the service startup file
rm -rf /etc/rc.d/init.d/my_service_script
Related recommendations: "Linux Video Tutorial》
The above is the detailed content of How to delete services under linux. For more information, please follow other related articles on the PHP Chinese website!