sysctl(8) is used to make changes to a running FreeBSD
system. This includes many advanced options of the
TCP/IP stack and virtual memory system
that can dramatically improve performance for an experienced
system administrator. Over five hundred system variables can
be read and set using sysctl(8).

At its core, sysctl(8) serves two functions: to read
and to modify system settings.

To view all readable variables:

%sysctl -a

To read a particular variable, specify its name:

%sysctl kern.maxproc
kern.maxproc: 1044

To set a particular variable, use the
variable=value
syntax:

#sysctl kern.maxfiles=5000
kern.maxfiles: 2088 -> 5000

Settings of sysctl variables are usually either strings,
numbers, or booleans, where a boolean is 1
for yes or 0 for no.

11.9.1. sysctl.conf

The configuration file for sysctl(8),
/etc/sysctl.conf, looks much like
/etc/rc.conf. Values are set in a
variable=value form. The specified values
are set after the system goes into multi-user mode. Not all
variables are settable in this mode.

For example, to turn off logging of fatal signal exits
and prevent users from seeing processes started by other
users, the following tunables can be set in
/etc/sysctl.conf:

# Do not log fatal signal exits (e.g., sig 11)
kern.logsigexit=0
# Prevent users from seeing information about processes that
# are being run under another UID.
security.bsd.see_other_uids=0