Get the App
SLTechnology News&Howtos  ›  Servers  › 

How to delete service under linux

Shulou Source: shulou.com Published: 2022-05-31 11:06:36 09月21日 Update

This article focuses on "how to delete services under linux". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn how to delete services under linux.

The method to delete a service is as follows: 1, stop the service using the command "service service name stop"; 2, use "rm-rf..." Command to clean up process resources (such as installation files); 3, use the "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 service under linux

1 stop the service

[root] # service my_service stop

2 clean up process resources (such as installation files)

[root] # cd / usr/sbin [root] # rm-rf my_service_file

3 delete service

Note: the purpose is to clean up the soft links in the service startup files. Update boot resources.

Use syntax:

Chkconfig [--add] [--del] [--list] [system Services] or chkconfig [--level] [system Services] [on/off/reset]

Parameter usage:

-add adds the specified system service so that the chkconfig instruction can manage it, and at the same time adds relevant data to the narrative file started by the system.

-del deletes the specified system service, which is no longer managed by the chkconfig instruction, and deletes the relevant data in the narrative file started by the system.

-level specifies the execution level in which the read system service is enabled or closed.

Examples of use:

Chkconfig-list lists all system services; chkconfig-add httpd adds httpd services; chkconfig-del httpd removes httpd services

4 delete the service startup file

Rm-rf / etc/rc.d/init.d/my_service_script so far, I believe you have a deeper understanding of "how to delete services under linux". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!

Tags: Services systems files commands resources content instructions data methods processes and the same learning management practical deeper interest parameters practicality practical simple operation Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Huawei NVidia Apple Redmi Shulou Technology