File: sysctl.8

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