Next | Prev | Up | Top | Contents | Index

Setting Options With chkconfig

You can use the chkconfig command to change some aspects of system configuration. To determine which aspects of a system you can alter with

chkconfig, enter the chkconfig command:

chkconfig

You see a list of configuration options, which are described in "Checking Options With chkconfig". If you use the -s option, you see a list that is sorted by whether the configuration item is on or off.

To change a configuration option, use the chkconfig command with two arguments: the name of the option you wish to change and the new status of the configuration (on or off). You must have root privilege to change a system configuration.

For example, to turn on detailed process accounting, log in either as root or as the system administrator, and enter:

chkconfig acct on

To turn off process accounting, enter:

chkconfig acct off

Some aspects of system configuration do not take effect until the system is shut down and rebooted because startup scripts, which are in the directory /etc/init.d, are run when the system is booted up and brought to multiuser mode. These scripts read the files that chkconfig sets to determine which daemons to start.

Some configuration items that can be controlled by chkconfig may not be displayed by chkconfig. These include:

nostickytmp

Sets ''sticky'' behavior for the directory /tmp. When the directory is sticky, (with nostickytmp set to off), users may not remove files from the directory unless they own the files, have explicit permission to remove the files (write permission), or have superuser privileges.

The opposite behavior allows users to remove or replace files in /tmp, which is a publicly writable directory, even if they do not own the files. This is handy behavior if you have users who need to create large temporary files and you are short on disk space. But it is better to increase disk space to avoid important files being removed.

nocleantmp

Controls whether or not the directory /tmp is cleaned out each time the system is booted. If nocleantmp is on, /tmp is not cleaned. If nocleantmp is off, all files in /tmp are removed each time the system is started.
If you want to see these flags in the chkconfig menu, you can use the -f option to force chkconfig to create a configuration file for the options:

chkconfig -f nocleantmp on

In this example, chkconfig creates a configuration file called nocleantmp in the directory /etc/config.


Next | Prev | Up | Top | Contents | Index