{"id":3318,"date":"2022-12-20T17:02:19","date_gmt":"2022-12-20T20:02:19","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/chkconfig-man8\/"},"modified":"2022-12-20T17:02:19","modified_gmt":"2022-12-20T20:02:19","slug":"chkconfig-man8","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/chkconfig-man8\/","title":{"rendered":"CHKCONFIG (man8)"},"content":{"rendered":"<h1 align=\"center\">CHKCONFIG<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#SYNOPSIS\">SYNOPSIS<\/a><br \/> <a href=\"#DESCRIPTION\">DESCRIPTION<\/a><br \/> <a href=\"#OPTIONS\">OPTIONS<\/a><br \/> <a href=\"#RUNLEVEL FILES\">RUNLEVEL FILES<\/a><br \/> <a href=\"#OVERRIDE FILES\">OVERRIDE FILES<\/a><br \/> <a href=\"#SEE ALSO\">SEE ALSO<\/a><br \/> <a href=\"#AUTHOR\">AUTHOR<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">chkconfig \u2212 updates and queries runlevel information for system services<\/p>\n<h2>SYNOPSIS <a name=\"SYNOPSIS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>chkconfig<\/b> [<b>&#8211;list<\/b>] [<b>&#8211;type<\/b> <i>type<\/i>] [<i>name<\/i>] <b><br \/> chkconfig &#8211;add<\/b> <i>name<\/i> <b><br \/> chkconfig &#8211;del<\/b> <i>name<\/i> <b><br \/> chkconfig &#8211;override<\/b> <i>name<\/i> <b><br \/> chkconfig<\/b> [<b>&#8211;level<\/b> <i>levels<\/i>] [<b>&#8211;type<\/b> <i>type<\/i>] [<b>&#8211;no-redirect<\/b>] <i>name<\/i> <<b>on<\/b>|<b>off<\/b>|<b>reset<\/b>|<b>resetpriorities<\/b>> <b><br \/> chkconfig<\/b> [<b>&#8211;level<\/b> <i>levels<\/i>] [<b>&#8211;type<\/b> <i>type<\/i>] [<b>&#8211;no-redirect<\/b>] <i>name<\/i><\/p>\n<h2>DESCRIPTION <a name=\"DESCRIPTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i><b>chkconfig<\/b><\/i> provides a simple command-line tool for maintaining the \/etc\/rc0.d \/etc\/rc1.d \/etc\/rc2.d \/etc\/rc3.d \/etc\/rc4.d \/etc\/rc5.d \/etc\/rc6.d directory hierarchy by relieving system administrators of the task of directly manipulating the numerous symbolic links in those directories.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">This implementation of <b>chkconfig<\/b> was inspired by the <b>chkconfig<\/b> command present in the IRIX operating system. Rather than maintaining configuration information outside of the \/etc\/rc0.d \/etc\/rc1.d \/etc\/rc2.d \/etc\/rc3.d \/etc\/rc4.d \/etc\/rc5.d \/etc\/rc6.d hierarchy, however, this version directly manages the symlinks in \/etc\/rc[0-6].d. This leaves all of the configuration information regarding what services <i>init<\/i> starts in a single location.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>chkconfig<\/b> has five distinct functions: adding new services for management, removing services from management, listing the current startup information for services, changing the startup information for services, and checking the startup state of a particular service.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When <b>chkconfig<\/b> is run with only a service name, it checks to see if the service is configured to be started in the current runlevel. If it is, <b>chkconfig<\/b> returns true; otherwise it returns false. The <b>&#8211;level<\/b> option may be used to have <b>chkconfig<\/b> query an alternative runlevel rather than the current one.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">When <b>chkconfig<\/b> is run with the <b>&#8211;list<\/b> argument, or no arguments at all, a listing is displayed of all services and their current configuration.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">If one of <b>on<\/b>, <b>off<\/b>, <b>reset<\/b>, or <b>resetpriorities<\/b> is specified after the service name, <b>chkconfig<\/b> changes the startup information for the specified service. The <b>on<\/b> and <b>off<\/b> flags cause the service to be started or stopped, respectively, in the runlevels being changed. The <b>reset<\/b> flag resets the on\/off state for all runlevels for the service to whatever is specified in the init script in question, while the <b>resetpriorities<\/b> flag resets the start\/stop priorities for the service to whatever is specified in the init script.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">By default, the <b>on<\/b> and <b>off<\/b> options affect only runlevels 2, 3, 4, and 5, while <b>reset<\/b> and <b>resetpriorities<\/b> affects all of the runlevels. The <b>&#8211;level<\/b> option may be used to specify which runlevels are affected.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">Note that for every service, each runlevel has either a start script or a stop script. When switching runlevels, init will not re-start an already-started service, and will not re-stop a service that is not running.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>chkconfig<\/b> also can manage xinetd scripts via the means of xinetd.d configuration files. Note that only the <b>on<\/b>, <b>off<\/b>, and <b>-\u2212list<\/b> commands are supported for xinetd.d services.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>chkconfig<\/b> supports a <b>-\u2212type<\/b> argument to limit actions to only a specific type of services, in the case where services of either type may share a name. Possible values for <i>type<\/i> are <i>sysv<\/i> and <i>xinetd<\/i>.<\/p>\n<h2>OPTIONS <a name=\"OPTIONS\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>-\u2212level<\/b> <i>levels<\/i><\/p>\n<p style=\"margin-left:22%;\">Specifies the run levels an operation should pertain to. It is given as a string of numbers from 0 to 6. For example, <b>&#8211;level 35<\/b> specifies runlevels 3 and 5.<\/p>\n<p style=\"margin-left:11%;\"><b>-\u2212no-redirect<\/b><\/p>\n<p style=\"margin-left:22%;\">When chkconfig is run on a system that uses systemd as its init system, chkconfig will forward commands to systemd if a systemd service file exists for it. This switch turns off the redirection to systemd and only operates on the symlinks in \/etc\/rc[0-6].d. This option is only valid when <b>on<\/b>, <b>off<\/b>, or no command (to check enablement) is passed to a service.<\/p>\n<p style=\"margin-left:11%;\"><b>-\u2212add<\/b> <i>name<\/i><\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">This option adds a new service for management by <b>chkconfig<\/b>. When a new service is added, <b>chkconfig<\/b> ensures that the service has either a start or a kill entry in every runlevel. If any runlevel is missing such an entry, <b>chkconfig<\/b> creates the appropriate entry as specified by the default values in the init script. Note that default entries in LSB-delimited \u2019INIT INFO\u2019 sections take precedence over the default runlevels in the initscript; if any Required-Start or Required-Stop entries are present, the start and stop priorities of the script will be adjusted to account for these dependencies.<\/p>\n<p style=\"margin-left:11%;\"><b>-\u2212del<\/b> <i>name<\/i><\/p>\n<p style=\"margin-left:22%;\">The service is removed from <b>chkconfig<\/b> management, and any symbolic links in \/etc\/rc0.d \/etc\/rc1.d \/etc\/rc2.d \/etc\/rc3.d \/etc\/rc4.d \/etc\/rc5.d \/etc\/rc6.d which pertain to it are removed.<\/p>\n<p style=\"margin-left:22%; margin-top: 1em\">Note that future package installs for this service may run <b>chkconfig \u2212\u2212add<\/b>, which will re-add such links. To disable a service, run <b>chkconfig<\/b> <i>name<\/i> <b>off<\/b>.<\/p>\n<p style=\"margin-left:11%;\"><b>-\u2212override<\/b> <i>name<\/i><\/p>\n<p style=\"margin-left:22%;\">If service <i>name<\/i> is configured exactly as it would be if the <b>-\u2212add<\/b> option had been specified with no override file in \/etc\/chkconfig.d\/<i>name<\/i>, and if \/etc\/chkconfig.d\/<i>name<\/i> now exists and is specified differently from the base initscript, change the configuration for service <i>name<\/i> to follow the overrides instead of the base configuration.<\/p>\n<p style=\"margin-left:11%;\"><b>-\u2212list<\/b> <i>name<\/i><\/p>\n<p style=\"margin-left:22%;\">This option lists all of the services which <b>chkconfig<\/b> knows about, and whether they are stopped or started in each runlevel. If <i>name<\/i> is specified, information in only display about service <i>name<\/i>.<\/p>\n<h2>RUNLEVEL FILES <a name=\"RUNLEVEL FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Each service which should be manageable by <b>chkconfig<\/b> needs two or more commented lines added to its init.d script. The first line tells <b>chkconfig<\/b> what runlevels the service should be started in by default, as well as the start and stop priority levels. If the service should not, by default, be started in any runlevels, a <b>\u2212<\/b> should be used in place of the runlevels list. The second line contains a description for the service, and may be extended across multiple lines with backslash continuation.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">For example, random.init has these three lines:<\/p>\n<pre style=\"margin-left:11%;\"># chkconfig: 2345 20 80 # description: Saves and restores system entropy pool for  # higher quality random number generation.<\/pre>\n<p style=\"margin-left:11%;\">This says that the random script should be started in levels 2, 3, 4, and 5, that its start priority should be 20, and that its stop priority should be 80. You should be able to figure out what the description says; the  causes the line to be continued. The extra space in front of the line is ignored.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">chkconfig also supports LSB-style init stanzas, and will apply them in preference to &#8220;chkconfig:&#8221; lines where available. A LSB stanza looks like:<\/p>\n<pre style=\"margin-left:11%;\">### BEGIN INIT INFO # Provides: foo # Required-Start: bar # Defalt-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Description: Foo init script ### END INIT INFO<\/pre>\n<p style=\"margin-left:11%; margin-top: 1em\">In this case, the start priority of &#8220;foo&#8221; would be changed such that it is higher than the &#8220;bar&#8221; start priority, if &#8220;bar&#8221; is enabled. Care must be taken when adding dependencies, as they can cause vast shifts in the start and stop priorities of many scripts.<\/p>\n<h2>OVERRIDE FILES <a name=\"OVERRIDE FILES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Files in \/etc\/chkconfig.d\/<i>servicename<\/i> are parsed using the same comments that chkconfig notices in init service scripts, and override values in the init service scripts themselves.<\/p>\n<h2>SEE ALSO <a name=\"SEE ALSO\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><i>init<\/i>(8) <i>ntsysv<\/i>(8) <i>system-config-services<\/i>(8)<\/p>\n<h2>AUTHOR <a name=\"AUTHOR\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">Erik Troan <ewt@redhat.com><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  chkconfig \u2212 updates and queries runlevel information for system services <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[5,52,448,4],"class_list":["post-3318","post","type-post","status-publish","format-standard","hentry","category-8-administracion-del-sistema","tag-5","tag-administracion","tag-chkconfig","tag-man8"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3318","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=3318"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/3318\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=3318"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=3318"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=3318"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}