Bump to procps-ng 3.3.16
[platform/upstream/procps-ng.git] / sysctl.8
1 .\" Copyright 1999, George Staikos (staikos@0wned.org)
2 .\" This file may be used subject to the terms and conditions of the
3 .\" GNU General Public License Version 2, or any later version
4 .\" at your option, as published by the Free Software Foundation.
5 .\" This program is distributed in the hope that it will be useful,
6 .\" but WITHOUT ANY WARRANTY; without even the implied warranty of
7 .\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8 .\" GNU General Public License for more details."
9 .TH SYSCTL "8" "2018-02-19" "procps-ng" "System Administration"
10 .SH NAME
11 sysctl \- configure kernel parameters at runtime
12 .SH SYNOPSIS
13 .B sysctl
14 [\fIoptions\fR] [\fIvariable\fR[\fB=\fIvalue\fR]] [...]
15 .br
16 .B sysctl \-p
17 [\fIfile\fR or \fIregexp\fR] [...]
18 .SH DESCRIPTION
19 .B sysctl
20 is used to modify kernel parameters at runtime.  The parameters available
21 are those listed under /proc/sys/.  Procfs is required for
22 .B sysctl
23 support in Linux.  You can use
24 .B sysctl
25 to both read and write sysctl data.
26 .SH PARAMETERS
27 .TP
28 .I variable
29 The name of a key to read from.  An example is kernel.ostype.  The '/'
30 separator is also accepted in place of a '.'.
31 .TP
32 .IR  variable = value
33 To set a key, use the form
34 .IR  variable = value
35 where
36 .I variable
37 is the key and
38 .I value
39 is the value to set it to.  If the value contains quotes or characters
40 which are parsed by the shell, you may need to enclose the value in double
41 quotes.
42 .TP
43 \fB\-n\fR, \fB\-\-values\fR
44 Use this option to disable printing of the key name when printing values.
45 .TP
46 \fB\-e\fR, \fB\-\-ignore\fR
47 Use this option to ignore errors about unknown keys.
48 .TP
49 \fB\-N\fR, \fB\-\-names\fR
50 Use this option to only print the names.  It may be useful with shells that
51 have programmable completion.
52 .TP
53 \fB\-q\fR, \fB\-\-quiet\fR
54 Use this option to not display the values set to stdout.
55 .TP
56 \fB\-w\fR, \fB\-\-write\fR
57 Use this option when all arguments prescribe a key to be set.
58 .TP
59 \fB\-p\fR[\fIFILE\fR], \fB\-\-load\fR[=\fIFILE\fR]
60 Load in sysctl settings from the file specified or /etc/sysctl.conf if none
61 given.  Specifying \- as filename means reading data from standard input.
62 Using this option will mean arguments to
63 .B sysctl
64 are files, which are read in the order they are specified.
65 The file argument may be specified as regular expression.
66 .TP
67 \fB\-a\fR, \fB\-\-all\fR
68 Display all values currently available.
69 .TP
70 \fB\-\-deprecated\fR
71 Include deprecated parameters to
72 .B \-\-all
73 values listing.
74 .TP
75 \fB\-b\fR, \fB\-\-binary\fR
76 Print value without new line.
77 .TP
78 \fB\-\-system\fR
79 Load settings from all system configuration files. Files are read from
80 directories in the following list in given order from top to bottom.
81 Once a file of a given filename is loaded, any file of the same name
82 in subsequent directories is ignored.
83 .br
84 /run/sysctl.d/*.conf
85 .br
86 /etc/sysctl.d/*.conf
87 .br
88 /usr/local/lib/sysctl.d/*.conf
89 .br
90 /usr/lib/sysctl.d/*.conf
91 .br
92 /lib/sysctl.d/*.conf
93 .br
94 /etc/sysctl.conf
95 .TP
96 \fB\-r\fR, \fB\-\-pattern\fR \fIpattern\fR
97 Only apply settings that match
98 .IR pattern .
99 The
100 .I pattern
101 uses extended regular expression syntax.
102 .TP
103 \fB\-A\fR
104 Alias of \fB\-a\fR
105 .TP
106 \fB\-d\fR
107 Alias of \fB\-h\fR
108 .TP
109 \fB\-f\fR
110 Alias of \fB\-p\fR
111 .TP
112 \fB\-X\fR
113 Alias of \fB\-a\fR
114 .TP
115 \fB\-o\fR
116 Does nothing, exists for BSD compatibility.
117 .TP
118 \fB\-x\fR
119 Does nothing, exists for BSD compatibility.
120 .TP
121 \fB\-h\fR, \fB\-\-help\fR
122 Display help text and exit.
123 .TP
124 \fB\-V\fR, \fB\-\-version\fR
125 Display version information and exit.
126 .SH EXAMPLES
127 /sbin/sysctl \-a
128 .br
129 /sbin/sysctl \-n kernel.hostname
130 .br
131 /sbin/sysctl \-w kernel.domainname="example.com"
132 .br
133 /sbin/sysctl \-p/etc/sysctl.conf
134 .br
135 /sbin/sysctl \-a \-\-pattern forward
136 .br
137 /sbin/sysctl \-a \-\-pattern forward$
138 .br
139 /sbin/sysctl \-a \-\-pattern 'net.ipv4.conf.(eth|wlan)0.arp'
140 .br
141 /sbin/sysctl \-\-system \-\-pattern '^net.ipv6'
142 .SH DEPRECATED PARAMETERS
143 The
144 .B base_reachable_time
145 and
146 .B retrans_time
147 are deprecated.  The sysctl command does not allow changing values of these
148 parameters.  Users who insist to use deprecated kernel interfaces should push values
149 to /proc file system by other means.  For example:
150 .PP
151 echo 256 > /proc/sys/net/ipv6/neigh/eth0/base_reachable_time
152 .SH FILES
153 .I /proc/sys
154 .br
155 .I /etc/sysctl.conf
156 .SH SEE ALSO
157 .BR sysctl.conf (5)
158 .BR regex (7)
159 .SH AUTHOR
160 .UR staikos@0wned.org
161 George Staikos
162 .UE
163 .SH "REPORTING BUGS"
164 Please send bug reports to
165 .UR procps@freelists.org
166 .UE