Chkconfig where is located




















The equivalent command to chkconfig is update-rc. This command nearly supports all the new versions of ubuntu. Scripts can still be started and stoped by 'service'. But the primary command is now 'systemctl'. The chkconfig command was left behind, and now you do this with systemctl. Chkconfig is no longer available in Ubuntu.

Chkconfig is a script. You can download it from here. I'm not sure where you got this package or what it contains; A url of download would be helpful. Without being able to look at the contents of chkconfig. In the below screenshot you can see apache2 starting in runlevel2 S02apache2 and stopping in runlevel1 K01apache2.

Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?

Collectives on Stack Overflow. Learn more. How do I install chkconfig on Ubuntu? Ask Question. Asked 7 years, 11 months ago. Active 8 months ago.

Viewed k times. I am running Ubuntu This may mean that the package is missing, has been obsoleted, or is only available from another source E: Package 'chkconfig' has no installation candidate I manually downloaded the package and unzipped it. The resulting folder has a file called: chkconfig. I tried this, but it didn't work.

Improve this question. Anthony Mastrean If no services are specified, chkconfig reads lines from standard input. As this is exactly the output of the terse list mode, this can be used to reconfigure a service specification saved by a former run. If the option -f or --force is also given, insserv is called with a '-f' option.

It writes the state of all specified services or all known services, if no service was provided into a temporary file, starts an editor and re-configures all services to reflect the states of the changed temporary file. If chkconfig is called with only a service name the current runlevel of the system is used for checking. LIST MODE List mode prints for each specified service a line that consists of the service name and for runlevels zero to six on or off depending if the service will be started or not.

The following code snippet shows how to check whether a service is configured for startup or not from a shell script. To view only the services that are configured to be started during system startup, do the following. Please note that this assumes that your system startup level is 3. Use —add option to add a specific service to the list of services that will be started during system reboot. The following example shows how to add a new service for example, iptables to the list of services that needs to be started.

While this is pretty obvious, it is worth to mention it, as a newbie might make this mistake. Sometimes you might not want to delete the whole service. Instead, you might just want to turn the flag on or off for a particular run level for a particular service.

You can also combine multiple levels. The following example will turn off nfsserver for both level 3 and 5. So, xinetd will have two files under rc3. The file that starts with K is used during shutdown K stands for kill. The file that starts with S is used during startup S stands for start.

When you add a new service to chkconfig control, the default run levels for that service will be turned on automatically, and files will be created under the corresponding rcx directories.



0コメント

  • 1000 / 1000