Chapter 7. System Configuration

Table of Contents

Introduction
/etc/abuild.conf: Package build configuration
/etc/apk/repositories: Package repository configuration
/etc/asound.conf: System audio configuration
/etc/bash/bashrc: Bash shell startup configuration
/etc/conf.d/alsa: Mixer level configuration
/etc/conf.d/bootmisc: Boot behaviour configuration
/etc/conf.d/devfs: /dev configuration
/etc/conf.d/dmesg: dmesg configuration
/etc/conf.d/fsck: Startup file system check configuration
/etc/conf.d/gettys: System console configuration
/etc/conf.d/modules: Kernel module configuration
/etc/conf.d/net: Network configuration
/etc/conf.d/urandom: Random number configuration
/etc/default/console-setup: Virtual terminal configuration
/etc/default/keyboard: Console keyboard configuration
/etc/dracut.conf.d/: Early system initialisation configuration
/etc/fstab: Filesystem mount point configuration
/etc/hostname: Host name configuration
/etc/inputrc: Bash shell keyboard configuration
/etc/issue: System identification configuration
/etc/localtime: Time zone configuration
/etc/login.defs: Login configuration
/etc/motd: Login message configuration
/etc/profile.d/: Shell startup configuration
/etc/rc.conf: Service manager configuration
/etc/resolv.conf: Network name resolution configuration

In this chapter, we will overview the main configuration files present in the Adélie Linux system.

Introduction

This chapter will cover the main configuration files that are commonly referenced in the daily administration of Adélie Linux systems. This list is not exhaustive, and is not a list of every configuration file in the Adélie Linux system. Some configuration files are only present when a specific system option (such as audio, graphics, or networking) is installed.

Each section in this chapter has the following subsections:

  • Purpose, which describes for what the configuration file is responsible;

  • Syntax, which describes the high-level syntax type used by the configuration file; and finally,

  • either Detailed Information for information on configuration files specific to the Adélie Linux system, or External References for either manual pages or online links to more information about configuration files from packages.

/etc/abuild.conf: Package build configuration

Purpose

The /etc/abuild.conf file determines how packages are built on the system. This file sets global parameters; $HOME/.abuild.conf can override any setting from the /etc/abuild.conf on a per-user basis.

Syntax

Shell script. Comments may appear anywhere, and start with '#'. Variables are in uppercase and follow shell quote syntax.

External References

Please reference the Adélie Linux Developer's Handbook for more information about how to configure /etc/abuild.conf. If you are reading this documentation on your local computer, the Developer's Handbook may be found in the devel/ directory at the same level as this handbook's admin/ directory. If you are reading this documentation online via the Internet, you may find the newest version of the Developer's Handbook at the Adélie Linux Help Centre.

/etc/apk/repositories: Package repository configuration

Purpose

The /etc/apk/repositories file determines the repositories used by the APK package manager for obtaining packages. As noted in the section called “Package repositories”, package repositories contain packages that you may install and uninstall on an Adélie Linux system.

Syntax

A single URL or file location per line. Comments are not allowed.

Detailed Information

A repository must be either a URL (beginning with https://) or an absolute path (such as /srv/packages). The computer's architecture (as specified in /etc/apk/arch) will be appened to the path – for example, specifying the path /srv/packages/repository on a ppc64 computer will result in the packages and APKINDEX being retrieved from /srv/packages/repository/ppc64.

If a repository is invalid, does not have a recognised signing key, or does not exist, it will not be considered by APK. Depending on the parameters passed to APK and the operation being performed, this may be a warning or a fatal error.

/etc/asound.conf: System audio configuration

Purpose

The /etc/asound.conf file determines the behaviour audio hardware present on the system. It can be used to select default bitrates, configure hardware options, and determine which sound card is the default/primary in a system with multiple sound cards present. This file is only significant on systems that have audio options installed.

Syntax

Sections are blocks, with the name followed by curly braces ({ and }) where the options are specified for that section. See the external reference for more information.

External References

For more information on configuring system audio hardware, refer to the official documentation at the ALSA Project Web site on the Internet.

/etc/bash/bashrc: Bash shell startup configuration

Purpose

The /etc/bash/bashrc file is sourced by the Bash shell when it starts up. This can set shell options and configure the shell environment for you. It is highly recommended to create your own scripts inside /etc/profile.d instead of modifying /etc/bash/bashrc, since it may change during upgrades to the Bash package. This file is only present on systems that have the Bash shell installed.

Syntax

Shell script.

External References

For more information, refer to the bash(1) manpage. If this manpage is not present on your system, it may be installed via the bash-doc package.

/etc/conf.d/alsa: Mixer level configuration

Purpose

The /etc/conf.d/alsa file determines if volume levels are preserved across system restarts when the alsasound service is enabled. This file is only significant on systems that have audio options installed.

Syntax

Shell script. Variables are in uppercase.

External References

For more information, refer to the comments in the /etc/conf.d/alsa file.

/etc/conf.d/bootmisc: Boot behaviour configuration

Purpose

The /etc/conf.d/bootmisc file determines certain characteristics about boot behaviour. It controls whether the /tmp directory is cleaned, and whether dmesg is written to /var/log/dmesg on boot. It also controls if the previous /var/log/dmesg is renamed to /var/log/dmesg.old for later comparison.

Syntax

Shell script. Variables are in lowercase. Booleans may be set as YES or NO.

Detailed Information

The /etc/conf.d/bootmisc file defines the following configuration variables:

Table 7.1. Configurable variables in /etc/conf.d/bootmisc

Variable Meaning Default
clean_tmp_dirs Directories to be treated as temporary, to be cleaned when wipe_tmp is YES. /tmp
wipe_tmp Determines if the directories listed in clean_tmp_dirs are completely erased on system boot. YES
log_dmesg Determines if the contents of the dmesg kernel message buffer are written to /var/log/dmesg on system boot. YES
previous_dmesg When log_dmesg is YES, determines if /var/log/dmesg is moved to /var/log/dmesg.old on system boot instead of being overwritten. NO

/etc/conf.d/devfs: /dev configuration

Purpose

The /etc/conf.d/devfs file determines if the system attempts to mount /dev during system initialisation. Most systems will not need this configuration modified.

Syntax

Shell script. Variables are in lowercase. Booleans may be set as YES or NO.

Detailed Information

The skip_mount_dev variable may be set to YES to prevent the system from automatically attempting to mount /dev during system initialisation. The default setting of the skip_mount_dev variable is NO.

/etc/conf.d/dmesg: dmesg configuration

Purpose

The /etc/conf.d/dmesg file determines the behaviour of the dmesg kernel log buffer.

Syntax

Shell script. Variables are in lowercase.

Detailed Information

The dmesg_level controls the "console level", or the severity required for a message to be printed to the system console. The default value is 1, which corresponds to the emerg log level. This prevents all messages from being written to the console except kernel panics.

/etc/conf.d/fsck: Startup file system check configuration

Purpose

The /etc/conf.d/fsck file determines the behaviour of the fsck (file system check) command during system initialisation. It is important to note that the configuration in the /etc/conf.d/fsck does not control manual invocations of the fsck command.

Syntax

Shell script. Variables are in lowercase. Booleans may be set as YES or NO.

Detailed Information

The /etc/conf.d/fsck file defines the following configuration variables:

Table 7.2. Configurable variables in /etc/conf.d/fsck

Variable Meaning Default
fsck_args Determines the command line arguments passed for routine fsck. -p -C0 -T -A
fsck_passno Determines which file systems will be checked by routine fsck during system initialisation by their "pass number" in /etc/fstab.
fsck_on_battery Determines if fsck will be run on startup if the computer is running on battery power. YES
fsck_shutdown Determines if routine fsck should be performed during system shutdown, instead of during system initialisation. NO
fsck_abort_on_errors Determines if system initialisation should be halted if fsck finds errors. YES

/etc/conf.d/gettys: System console configuration

Purpose

The /etc/conf.d/gettys file determines the parameters and behaviour of virtual terminals (VTs) and serial consoles on the system.

Syntax

Shell script. Variables are mixed-case.

Detailed Information

The /etc/conf.d/gettys file defines the variable GETTYS. The GETTYS variable controls the devices that the system will search for, on which to run VTs. Each device is separated by a space (" "). The default is "tty1 tty2 tty3 tty4 tty5 tty6 hvc0", which will start a VT on each virtual TTY 1-6, and also start a VT on hvc0 if it exists. The hvc0 device is present on most IBM servers, and also most Xen guests.

For every device specified in GETTYS, the following two variables can be used for further device configuration:

Configuration variables in /etc/conf.d/gettys

GETTYS_term_OPTIONS

Determines the options passed to agetty for this VT. For more information, refer to the agetty manual, found in the util-linux-doc package.

GETTYS_term_BAUDRATE

Determines the baud rate of the specified serial line. This option is only effective on devices that act as serial lines.

[Important] Important

Changes to this file will not take effect until the system is restarted.

/etc/conf.d/modules: Kernel module configuration

Purpose

The /etc/conf.d/modules file specifies additional kernel modules to load during system initialisation.

Syntax

Shell script. Variables are in lowercase.

Detailed Information

The /etc/conf.d/modules file allows you to specify additional kernel modules for the system to load during initialisation. This is typically unnecessary as the eudev system will automatically load any modules required for the correct functioning of your hardware. However, some advanced use cases may require the loading of additional kernel modules.

The /etc/conf.d/modules file defines the modules configuration variables. This is a space-delimited list of modules to load.

For each module specified, an additional variable, module_MODNAME_args, is defined, where MODNAME is the name of the module. The module_MODNAME_args variable controls the arguments passed to the module. Refer to the documentation for each module for a list of arguments it supports.

/etc/conf.d/net: Network configuration

Purpose

The /etc/conf.d/net file determines the configuration of the network adaptor(s) installed in the system.

Syntax

Shell script style.

Detailed Information

Refer to Chapter 5, Networking for information on configuring networks using the Adélie Linux system.

/etc/conf.d/urandom: Random number configuration

Purpose

The /etc/conf.d/urandom file determines the path where the random number seed is stored when the system is shut down.

Syntax

Shell script. Variables are in lowercase.

Detailed Information

The /etc/conf.d/urandom file defines a single configuration variable, urandom_seed, which specifies the path in which to save the random number seed when the system is shut down. The default is /var/lib/misc/random-seed. This variable must point to a path that is on the root filesystem; if /var is a separate filesystem, you must configure this variable to use a different path.

/etc/default/console-setup: Virtual terminal configuration

Purpose

The /etc/default/console-setup file determines the configuration of the system virtual terminals or consoles. Note that this does not include graphical terminals run inside X11 (such as Konsole or XFCE Terminal).

Syntax

Shell script style. Variables are in uppercase.

External References

For more information, consult the official manual page for console-setup(5). This manual page is available in the console-setup-doc package. If your computer has an Internet connection, you may also read it on the Web.

/etc/default/keyboard: Console keyboard configuration

Purpose

The /etc/default/keyboard file determines the configuration of the keyboard on the system virtual terminals or consoles. This file does not control the configuration of the keyboard inside X11 or a desktop environment (such as KDE or LXQt).

Syntax

Shell script style. Variables are in uppercase.

Detailed Information

The /etc/default/keyboard file is used by the console-setup package (when the console-setup service is enabled) to configure the keyboard model and layout in use on the system's virtual terminals. The most important variables in the /etc/default/keyboard file are the XKBMODEL variable, which controls the model of keyboard, and the XKBLAYOUT variable, which controls the layout of the keyboard.

In order to use additional keyboard layouts, you must install the console-keymaps package.

External Resources

For more information, consult the official manual page for keyboard(5). This manual page is available in the console-setup-doc package. If your computer has an Internet connection, you may also read it on the Web.

/etc/dracut.conf.d/: Early system initialisation configuration

Purpose

The /etc/dracut.conf.d directory contains files that determine the configuration of dracut, the initial RAM disk generation system for the Adélie Linux system. The initial RAM disk is needed on some computers during system initialisation; tasks it may perform include enabling access to a disk, unlocking an encrypted partition, or establishing a network connection.

Syntax

Shell script style. Variables are in lowercase.

External Resources

For more information, consult the dracut.conf(5) manual page. This manual page is available in the dracut-doc package.

/etc/fstab: Filesystem mount point configuration

Purpose

The /etc/fstab file determines the mount points of file systems on the hard disk(s) connected to a system. It may also control whether or not users may mount removable storage devices such as CD-ROM devices, and where they may mount them.

Syntax

The syntax for /etc/fstab is columnar in nature. There may be any amount of whitespace between columns; the following two lines will be viewed identically to the system:

/dev/sda1 /boot ext3 defaults 0 1
/dev/sda1       /boot       ext3        defaults    0   1

External Resources

For more information, consult the fstab(5) manual page. This manual page is available in the util-linux-doc package.

/etc/hostname: Host name configuration

Purpose

The /etc/hostname file determines the host name of the system. This is used in system prompts, and for identification on a network.

Syntax

The host name must appear as the only content of this file. Any other contents are invalid.

Detailed Information

The /etc/hostname is read during system initialisation. The system host name is set to the contents of this file. If the /etc/hostname file is missing or corrupt, the system will retain the kernel's default host name — with the default Adélie Linux kernel, this is "adelie".

/etc/inputrc: Bash shell keyboard configuration

Purpose

The /etc/inputrc file determines the behaviour of keyboard input and the system bell in programs that use the GNU readline library. The GNU readline library is not packaged for the Adélie Linux system; therefore, the only system packages that would use the configuration in this file are bash and gdb, which contain their own private copies of the GNU readline library.

Syntax

The /etc/inputrc is declarative in nature; variables are set using the set command, and escape sequences are mapped to functions using the format: "<escape sequence>": function.

External Resources

There are a few comments in the /etc/inputrc file. Since the GNU readline library is not packaged for the Adélie Linux system, it is not possible to read the manual page.

/etc/issue: System identification configuration

Purpose

The /etc/issue file determines the message that will be displayed on virtual terminals and consoles before the login prompt.

Syntax

Text file. Escape sequences are supported.

External References

For more information, refer to the Issue Files section of the agetty(8) manual page. The agetty(8) manual page is available in the util-linux-doc package.

/etc/localtime: Time zone configuration

Purpose

The /etc/localtime file determines the system's time zone. The system time zone is shown in date(1), file modification times, log files, and other functions. It is important to ensure this file is correct.

Syntax

Binary time zone file. Please do not edit the file directly in an editor.

Detailed Information

The tzdata package provides a number of time zone files in the /usr/share/zoneinfo directory. When configuring the system time zone, you should make a symbolic link from your time zone to /etc/localtime. Alternatively, if you are using a split /usr (not common), you may copy the file directly. For example, to set the system time zone to American Central Time, you would run ln -s /usr/share/zoneinfo/America/Chicago /etc/localtime; or, if you are using a split /usr (not common), you would run cp /usr/share/zoneinfo/America/Chicago /etc/localtime. For a full list of time zones available, run find /usr/share/zoneinfo.

/etc/login.defs: Login configuration

Purpose

The /etc/login.defs file determines the configuration for the shadow package, which is responsible for all logins and the su command on the Adélie Linux system.

Syntax

Each line describes a configuration value; the name and value are separated by whitespace. Blank lines and comment lines are ignored. Comments may not appear anywhere other than the beginning of a line.

External References

For more information, refer to the login.defs(5) manual page. The login.defs(5) manual page is available in the shadow-doc package.

/etc/motd: Login message configuration

Purpose

The /etc/motd file determines the message that will be displayed to users when they log in to the system.

Syntax

Plain text.

Detailed Information

The entire contents of the /etc/motd file are displayed to a user when they log in to the system. No command substitution or escape sequences are recognised; the file is entirely plain text. The default login message provides pointers on where to find the documentation for the Adélie Linux system.

/etc/profile.d/: Shell startup configuration

Purpose

The /etc/profile.d directory contains files that determine the shell environment for all users on the system.

Syntax

Shell scripts.

Detailed Information

The /etc/profile script is sourced by most shells during interactive logins. This script enumerates all shell scripts present in /etc/profile.d and sources them. Adding an executable shell script to /etc/profile.d allows you to set environment variables or add shell functions for interactive use. Note that most shells will not source these files during non-interactive logins.

/etc/rc.conf: Service manager configuration

Purpose

The /etc/rc.conf file determines the behaviour of the service manager, which is partially responsible for system initialisation.

Syntax

Shell script. Variables are in lowercase. Booleans may be set as YES or NO.

Detailed Information

The /etc/rc.conf file defines the following configuration variables:

Table 7.3. Configurable variables in /etc/rc.conf

Variable Meaning Default
rc_parallel Determines whether the system should attempt to start multiple services at the same time.
[Warning] Danger

This option may harm the stability of your system or render it inoperable. Take extreme caution before changing the default.

NO
rc_interactive Determines whether the system should allow a user to hold the "I" key during system initialisation to choose which services to start. NO
rc_shell Determines the shell to spawn if the system fails to initialise correctly. /bin/sh
rc_depend_strict Determines whether all providers of a dependency are required to start before dependent services are started. For an example, refer to the section called “Advanced: Multiple interfaces”. YES
rc_logger Determines whether system initialisation activity is logged to disk for review by the system administrator. YES
rc_log_path Determines the path in which to write the system initialisation activity log, if rc_logger is set to YES. /var/log/rc.log
rc_verbose Determines if the service manager should output extra messages, which can be useful for debugging an issue with services. NO
rc_nocolor Determines if colourful output should be suppressed. NO
unicode Determines if the system terminal supports Unicode.
[Warning] Warning

Disabling Unicode support may cause some applications to work improperly.

YES
rc_sys Determines the system environment. This may be autodetected. Only set this option if autodetection does not work. Valid options are "" for a typical Adélie Linux system; "docker" for a Docker container; "lxc" for a LXC container; "openvz" for an OpenVZ container; "xen0" for a Xen domain 0 instance; and "xenU" for a Xen guest domain instance.
rc_tty_number Determines how many TTYs the service manager should allow services to configure. This does not impact the number of TTYs actually allocated; refer to the section called “/etc/conf.d/gettys: System console configuration” for this option. 12
rc_controller_cgroups Determines whether cgroups should be used for services. Refer to the kernel documentation on cgroups for more information. NO

/etc/resolv.conf: Network name resolution configuration

Purpose

The /etc/resolv.conf file determines how names are resolved on the network. This includes the domain suffix that should be searched when the system searches for a host name on the network. This additionally includes the nameservers used to resolve names into IP addresses (typically via DNS).

Syntax

Each line describes a configuration value; the name and value are separated by whitespace. Blank lines and comment lines are ignored.

Detailed Information

For more information about configuring name resolution, refer to the section called “Configuring DNS resolution”.