Get the App
SLTechnology News&Howtos  ›  Servers  › 

The implementation method of controlling Service Operation by chkconfig tools under linux

Shulou Source: shulou.com Published: 2022-06-01 16:50:45 10月06日 Update

This article mainly explains the "implementation method of chkconfig tools under linux to control the operation of services". The content of the explanation in this article is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the implementation method of chkconfig tools to control service operation under linux".

Linux services are run as scripts, and Fedora is no exception, and the scripts for these services are placed in the / etc/rc.d/init.d directory. We can control the details of its operation by modifying the service scripts here.

Fedira and RedHat provide a chkconfig tool that makes it easier to control the operation of services.

Usage:

Chkconfig-- list [name]

Chkconfig-add

Chkconfig-del

Chkconfig-override

Chkconfig [--level]

For example, to view a list of all services:

# chkconfig-list

View the run level of only one service (smb):

# chkconfig-list smb

Smb 0: close 1: close 2: close 3: close 4: close 5: close 6: close

The above line clearly shows that the smb server is turned off at all runtime levels. We can open it with the following command. For example, let smb run automatically in both 3 (character) and 5 (graphics) modes:

# chkconfig-- level 35 smb on

# chkconfig-list smb

Smb 0: off 1: close 2: close 3: enable 4: close 5: enable 6: close

Is it open?

Then why is it off? Just try to change on to off.

Thank you for your reading, the above is the content of "the implementation method of chkconfig tool control service operation under linux". After the study of this article, I believe you have a deeper understanding of the implementation method of chkconfig tool control service operation under linux, and the specific use situation still needs to be verified by practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Tags: Services runs controls tools methods scripts learning content levels facets commands graphics characters that is ideas situations articles ways more Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Tech Info MariaDB NVidia OPPO Reno Huawei