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. Files are
65              read from directories in the following list in given order  from
66              top  to  bottom.  Once a file of a given filename is loaded, any
67              file of the same name in subsequent directories is ignored.
68              /run/sysctl.d/*.conf
69              /etc/sysctl.d/*.conf
70              /usr/local/lib/sysctl.d/*.conf
71              /usr/lib/sysctl.d/*.conf
72              /lib/sysctl.d/*.conf
73              /etc/sysctl.conf
74
75       -r, --pattern pattern
76              Only apply  settings  that  match  pattern.   The  pattern  uses
77              extended regular expression syntax.
78
79       -A     Alias of -a
80
81       -d     Alias of -h
82
83       -f     Alias of -p
84
85       -X     Alias of -a
86
87       -o     Does nothing, exists for BSD compatibility.
88
89       -x     Does nothing, exists for BSD compatibility.
90
91       -h, --help
92              Display help text and exit.
93
94       -V, --version
95              Display version information and exit.
96

EXAMPLES

98       /sbin/sysctl -a
99       /sbin/sysctl -n kernel.hostname
100       /sbin/sysctl -w kernel.domainname="example.com"
101       /sbin/sysctl -p/etc/sysctl.conf
102       /sbin/sysctl -a --pattern forward
103       /sbin/sysctl -a --pattern forward$
104       /sbin/sysctl -a --pattern 'net.ipv4.conf.(eth|wlan)0.arp'
105       /sbin/sysctl --system --pattern '^net.ipv6'
106

DEPRECATED PARAMETERS

108       The  base_reachable_time  and  retrans_time are deprecated.  The sysctl
109       command does not allow changing values of these parameters.  Users  who
110       insist  to use deprecated kernel interfaces should push values to /proc
111       file system by other means.  For example:
112
113       echo 256 > /proc/sys/net/ipv6/neigh/eth0/base_reachable_time
114

FILES

116       /proc/sys
117       /etc/sysctl.conf
118

SEE ALSO

120       sysctl.conf(5) regex(7)
121

AUTHOR

123       George Staikos ⟨staikos@0wned.org⟩
124

REPORTING BUGS

126       Please send bug reports to ⟨procps@freelists.org⟩
127
128
129
130procps-ng                         2018-02-19                         SYSCTL(8)
Impressum