RC.CONF(5) File Formats Manual RC.CONF(5)

rc.confsystem configuration file

/etc/rc.conf

This manual page describes the format of the /etc/rc.conf file. This file is a simple POSIX sh(1p) script that defines font, timezone, hostname and services which are used on system initialization and shutdown.

The file consists of a number of variable assignments of the form “variable=value”. Comments can be specified by putting a hash (‘#’) symbol as the first character on the line.

The different configuration variables are:

=⟨0-60 | force | poke
Specifies the interval of console inactivity, in minutes, after which the screen will be automatically blanked. The contents of this variable will be passed as argument to setterm(1).

The force argument keeps the screen blank even if a key is pressed.

The poke argument unblanks the screen.

If BLANKTIME is unset, then rc(8) make screen blanks after 15 minutes of idle time.

Example: “BLANKTIME=15”

=⟨STRING
Specifies which console font to load at system startup. The contents of this variable will be passed as argument to setfont(8). The available fonts are located in /usr/share/kbd/consolefonts/.

Example: “FONT=default”

=⟨STRING
Specifies which console keyboard map to load at system startup. The contents of this variable will be passed as argument to loadkeys(1). The available keyboard maps are located in /usr/share/kbd/keymaps/.

Example: “KEYMAP=us”

=⟨STRING
Specifies the timezone used by the system. The available zone description files are located in /usr/share/zoneinfo/.

Example: “TIMEZONE=Europe/Stockholm”

=⟨STRING
Specifies the hostname.

Example: “HOSTNAME=pluto”

=⟨1 | true | yes | y
Specifies seedrng(8) that seeds never credit the RNG, even if the seed file is creditable. Disabled by default.

Example: “SEEDRNG_SKIP_CREDIT=false”

=⟨STRING
Specifies the system logging daemon to run at startup. The daemon specified in this string must have a matching start/stop script in /etc/rc.d.

Example: “SYSLOG=sysklogd”

=‘STRING ...
Specifies which services to start at system startup. The services specified in this string must be separated by space and have a matching start/stop script in /etc/rc.d/. When entering multi-user mode the specified scripts will be called in the specified order with the argument “start”. At system shutdown or when entering single-user mode these scripts will be called in the reverse order with the argument “stop”.

Example: “SERVICES=‘lo crond net sshd’”

The reason why the SYSLOG is specified separately from the SERVICES variable is as follows: firstly, the syslog daemon also starts in the single-user mode, and secondly, it is needed before the start of any services, so that the services can log the result if their work.

/etc/rc.conf
System configuration file.

A sample /etc/rc.conf file:

#
# /etc/rc.conf: system configuration
#
# See rc.conf(5) for more information.
#

BLANKTIME=15
FONT=default
KEYMAP=us
TIMEZONE=UTC
HOSTNAME=host
SYSLOG=sysklogd
SERVICES='lo crond net'

# End of file.

rc(8)

September 3, 2023 Zeppe-Lin