1SYSCTL(8)                    System Administration                   SYSCTL(8)
2
3
4

NAME

6       sysctl - configure kernel parameters at runtime
7

SYNOPSIS

9       sysctl [options] [variable[=value]] [...]
10       sysctl -p [file or regexp] [...]
11

DESCRIPTION

13       sysctl  is used to modify kernel parameters at runtime.  The parameters
14       available are those listed under /proc/sys/.  Procfs  is  required  for
15       sysctl  support  in  Linux.   You can use sysctl to both read and write
16       sysctl data.
17

PARAMETERS

19       variable
20              The name of a key to read from.  An  example  is  kernel.ostype.
21              The '/' separator is also accepted in place of a '.'.
22
23       variable=value
24              To  set a key, use the form variable=value where variable is the
25              key and value is the value to set it to.  If the value  contains
26              quotes or characters which are parsed by the shell, you may need
27              to enclose the value in double quotes.
28
29       -n, --values
30              Use this option to disable printing of the key name when  print‐
31              ing values.
32
33       -e, --ignore
34              Use this option to ignore errors about unknown keys.
35
36       -N, --names
37              Use  this option to only print the names.  It may be useful with
38              shells that have programmable completion.
39
40       -q, --quiet
41              Use this option to not display the values set to stdout.
42
43       -w, --write
44              Use this option when all arguments prescribe a key to be set.
45
46       -p[FILE], --load[=FILE]
47              Load  in  sysctl   settings   from   the   file   specified   or
48              /etc/sysctl.conf  if none given.  Specifying - as filename means
49              reading data from standard input. Using this  option  will  mean
50              arguments  to sysctl are files, which are read in the order they
51              are specified.  The file argument may be  specified  as  regular
52              expression.
53
54       -a, --all
55              Display all values currently available.
56
57       --deprecated
58              Include deprecated parameters to --all values listing.
59
60       -b, --binary
61              Print value without new line.
62
63       --system
64              Load  settings from all system configuration files. See the SYS‐
65              TEM FILE PRECEDENCE section below.
66
67       -r, --pattern pattern
68              Only apply settings that match pattern.  The  pattern  uses  ex‐
69              tended regular expression syntax.
70
71       -A     Alias of -a
72
73       -d     Alias of -h
74
75       -f     Alias of -p
76
77       -X     Alias of -a
78
79       -o     Does nothing, exists for BSD compatibility.
80
81       -x     Does nothing, exists for BSD compatibility.
82
83       -h, --help
84              Display help text and exit.
85
86       -V, --version
87              Display version information and exit.
88

SYSTEM FILE PRECEDENCE

90       When using the --system option, sysctl will read files from directories
91       in the following list in given order from top to bottom. Once a file of
92       a given filename is loaded, any file of the same name in subsequent di‐
93       rectories is ignored.
94
95       /etc/sysctl.d/*.conf
96       /run/sysctl.d/*.conf
97       /usr/local/lib/sysctl.d/*.conf
98       /usr/lib/sysctl.d/*.conf
99       /lib/sysctl.d/*.conf
100       /etc/sysctl.conf
101
102       All configuration files are sorted in lexicographic  order,  regardless
103       of the directory they reside in. Configuration files can either be com‐
104       pletely replaced (by having a new configuration file with the same name
105       in  a  directory of higher priority) or partially replaced (by having a
106       configuration file that is ordered later).
107

EXAMPLES

109       /sbin/sysctl -a
110       /sbin/sysctl -n kernel.hostname
111       /sbin/sysctl -w kernel.domainname="example.com"
112       /sbin/sysctl -p/etc/sysctl.conf
113       /sbin/sysctl -a --pattern forward
114       /sbin/sysctl -a --pattern forward$
115       /sbin/sysctl -a --pattern 'net.ipv4.conf.(eth|wlan)0.arp'
116       /sbin/sysctl --pattern '^net.ipv6' --system
117

DEPRECATED PARAMETERS

119       The base_reachable_time and retrans_time are  deprecated.   The  sysctl
120       command  does not allow changing values of these parameters.  Users who
121       insist to use deprecated kernel interfaces should push values to  /proc
122       file system by other means.  For example:
123
124       echo 256 > /proc/sys/net/ipv6/neigh/eth0/base_reachable_time
125

FILES

127       /proc/sys
128       /etc/sysctl.d/*.conf
129       /run/sysctl.d/*.conf
130       /usr/local/lib/sysctl.d/*.conf
131       /usr/lib/sysctl.d/*.conf
132       /lib/sysctl.d/*.conf
133       /etc/sysctl.conf
134

SEE ALSO

136       sysctl.conf(5) regex(7)
137

AUTHOR

139       George Staikos ⟨staikos@0wned.org⟩
140

REPORTING BUGS

142       Please send bug reports to ⟨procps@freelists.org⟩
143
144
145
146procps-ng                         2023-01-16                         SYSCTL(8)
Impressum