1.\" Copyright (c) 2013-2026 Devin Teske <dteske@FreeBSD.org> 2.\" Copyright (c) 2021-2026 Faraz Vahedi <kfv@FreeBSD.org> 3.\" 4.\" SPDX-License-Identifier: BSD-2-Clause 5.\" 6.Dd August 2, 2026 7.Dt SYSCONF-TARGETS 8 8.Os 9.Sh NAME 10.Nm sysconf-targets 11.Nd sysconf multi-file sourcing and write policy 12.Sh SYNOPSIS 13.Nm sysconf 14.Ar target 15.Op options 16.Op Ar name Ns Op Ns Oo +|- Oc Ns = Ns Ar value ... 17.Sh DESCRIPTION 18This page documents rules shared by every 19.Xr sysconf 8 20target that is backed by more than one configuration file. 21Per-target file lists and syntax quirks are in 22.Xr sysconf-loader 8 , 23.Xr sysconf-sysctl 8 , 24.Xr sysconf-make 8 , 25.Xr sysconf-src 8 , 26.Xr sysconf-rc 8 , 27and 28.Xr sysconf-generic 8 . 29Shared options remain in 30.Xr sysconf 8 . 31.Ss Authoritative file 32Most targets consult several files in the deterministic order the system 33sources them at boot. 34A directive in a later file overrides the same directive in an earlier one, 35so the last file listing a directive is the authoritative source of its 36value. 37.Pp 38Reads report that authoritative value. 39Writes are applied to the authoritative file 40.Pq so the change survives a reboot 41or appended to the target's default write file 42.Pq the first modifiable file listed 43when the directive is set nowhere or only in the read-only defaults. 44Removals 45.Pq Fl x 46are applied to every file listing the directive, 47lest deleting the authoritative definition merely unmask an earlier one. 48.Ss Defaults files 49For a target with a defaults file 50.Po 51presently 52.Ql loader ; 53see 54.Xr sysconf-loader 8 55.Pc , 56the boot-time consumer sources the defaults before everything else, 57and so does 58.Nm sysconf : 59a directive no conf file mentions still reads back its default 60.Pq the value that does, in fact, take effect at boot , 61with 62.Fl F 63truthfully naming the defaults file as its source. 64The defaults file is nevertheless read-only bookkeeping: 65it is never chosen as a write target, 66never satisfies a removal, 67and is never listed by 68.Fl l 69or 70.Fl L 71.Pq which enumerate only files Nm sysconf may modify . 72.Pp 73Those targets additionally support querying defaults: 74.Fl d 75reports directive descriptions, 76.Fl D 77consults the defaults alone, 78and 79.Fl A 80widens dumps to include directives still at their system default 81.Po 82a named 83.Ar name 84read always reflects the defaults already; 85.Fl A 86changes only 87.Fl a 88scope, 89or dumps everything when given with no 90.Ar name 91arguments 92.Pc . 93Attempting any of these against a target with no defaults 94.Po 95.Cm make 96and 97.Cm src 98have neither a defaults file nor directive descriptions 99.Pc 100is an error. 101The one exception is 102.Ql sysctl -d , 103whose descriptions come from the running kernel rather than any file 104.Pq see Xr sysconf-sysctl 8 . 105.Ss Explicit file selection 106An arbitrary configuration file may be selected with 107.Fl f , 108which overrides 109.Em which 110file is consulted and modified 111.Pq the named file alone; multi-file processing is disabled 112but never 113.Em how : 114the format is always stated explicitly by the 115.Ar target 116keyword and is never inferred from the file. 117This composes freely, 118so a 119.Xr loader.conf 5 Ns -formatted 120file may be staged anywhere 121.Pq Ql sysconf loader -f /tmp/loader.conf.new ... 122and, 123conversely, 124any format may be deliberately applied to any file. 125.Pp 126How each built-in format discovers or lists its backing files is 127implemented by 128.Xr bsdconf_format 3 . 129.Sh LIMITATIONS 130.Nm sysconf 131does not evaluate 132.Xr make 1 133conditionals 134.Pq Ql .if , .elif , .else , .endif 135or other makefile control flow that may appear in 136.Pa make.conf , 137.Pa src.conf , 138or 139.Pa src-env.conf . 140.Pp 141It also does not consult 142.Pa sys.mk , 143.Pa local.sys.mk , 144or other 145.Xr make 1 146defaults under 147.Pa /usr/share/mk . 148.Pp 149Effective values from 150.Nm sysconf 151therefore match 152.Nm make Fl V 153for straight-line assignment and 154.Ql += 155chains in those conf files, 156but may differ when the value depends on conditionals or mk defaults. 157.Sh SEE ALSO 158.Xr bsdconf_format 3 , 159.Xr sysconf 8 , 160.Xr sysconf-generic 8 , 161.Xr sysconf-loader 8 , 162.Xr sysconf-make 8 , 163.Xr sysconf-rc 8 , 164.Xr sysconf-src 8 , 165.Xr sysconf-sysctl 8 166.Sh HISTORY 167The 168.Nm sysconf 169utility first appeared in 170.Fx 16.0 . 171.Sh AUTHORS 172.An Devin Teske Aq Mt dteske@FreeBSD.org 173.An Faraz Vahedi Aq Mt kfv@FreeBSD.org 174