228 lines
5.4 KiB
HTML
228 lines
5.4 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SYSCTL</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SYSCTL</H1>
|
|
Section: System Administration (8)<BR>Updated: 2018-02-19<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
sysctl - configure kernel parameters at runtime
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>sysctl</B>
|
|
|
|
[<I>options</I>] [<I>variable</I>[<B>=</B><I>value</I>]] [...]
|
|
<BR>
|
|
|
|
<B>sysctl -p</B>
|
|
|
|
[<I>file</I> or <I>regexp</I>] [...]
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>sysctl</B>
|
|
|
|
is used to modify kernel parameters at runtime. The parameters available
|
|
are those listed under /proc/sys/. Procfs is required for
|
|
<B>sysctl</B>
|
|
|
|
support in Linux. You can use
|
|
<B>sysctl</B>
|
|
|
|
to both read and write sysctl data.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>PARAMETERS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><I>variable</I>
|
|
|
|
<DD>
|
|
The name of a key to read from. An example is kernel.ostype. The '/'
|
|
separator is also accepted in place of a '.'.
|
|
<DT id="2"><I>variable</I>=<I>value</I>
|
|
|
|
<DD>
|
|
To set a key, use the form
|
|
<I>variable</I>=<I>value</I>
|
|
|
|
where
|
|
<I>variable</I>
|
|
|
|
is the key and
|
|
<I>value</I>
|
|
|
|
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.
|
|
<DT id="3"><B>-n</B>, <B>--values</B><DD>
|
|
Use this option to disable printing of the key name when printing values.
|
|
<DT id="4"><B>-e</B>, <B>--ignore</B><DD>
|
|
Use this option to ignore errors about unknown keys.
|
|
<DT id="5"><B>-N</B>, <B>--names</B><DD>
|
|
Use this option to only print the names. It may be useful with shells that
|
|
have programmable completion.
|
|
<DT id="6"><B>-q</B>, <B>--quiet</B><DD>
|
|
Use this option to not display the values set to stdout.
|
|
<DT id="7"><B>-w</B>, <B>--write</B><DD>
|
|
Use this option when all arguments prescribe a key to be set.
|
|
<DT id="8"><B>-p</B>[<I>FILE</I>], <B>--load</B>[=<I>FILE</I>]<DD>
|
|
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</B>
|
|
|
|
are files, which are read in the order they are specified.
|
|
The file argument may be specified as regular expression.
|
|
<DT id="9"><B>-a</B>, <B>--all</B><DD>
|
|
Display all values currently available.
|
|
<DT id="10"><B>--deprecated</B><DD>
|
|
Include deprecated parameters to
|
|
<B>--all</B>
|
|
|
|
values listing.
|
|
<DT id="11"><B>-b</B>, <B>--binary</B><DD>
|
|
Print value without new line.
|
|
<DT id="12"><B>--system</B><DD>
|
|
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
|
|
<DT id="13"><B>-r</B>, <B>--pattern</B> <I>pattern</I><DD>
|
|
Only apply settings that match
|
|
<I>pattern</I>.
|
|
|
|
The
|
|
<I>pattern</I>
|
|
|
|
uses extended regular expression syntax.
|
|
<DT id="14"><B>-A</B><DD>
|
|
Alias of <B>-a</B>
|
|
<DT id="15"><B>-d</B><DD>
|
|
Alias of <B>-h</B>
|
|
<DT id="16"><B>-f</B><DD>
|
|
Alias of <B>-p</B>
|
|
<DT id="17"><B>-X</B><DD>
|
|
Alias of <B>-a</B>
|
|
<DT id="18"><B>-o</B><DD>
|
|
Does nothing, exists for BSD compatibility.
|
|
<DT id="19"><B>-x</B><DD>
|
|
Does nothing, exists for BSD compatibility.
|
|
<DT id="20"><B>-h</B>, <B>--help</B><DD>
|
|
Display help text and exit.
|
|
<DT id="21"><B>-V</B>, <B>--version</B><DD>
|
|
Display version information and exit.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
/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'
|
|
<A NAME="lbAG"> </A>
|
|
<H2>DEPRECATED PARAMETERS</H2>
|
|
|
|
The
|
|
<B>base_reachable_time</B>
|
|
|
|
and
|
|
<B>retrans_time</B>
|
|
|
|
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:
|
|
<P>
|
|
|
|
echo 256 > /proc/sys/net/ipv6/neigh/eth0/base_reachable_time
|
|
<A NAME="lbAH"> </A>
|
|
<H2>FILES</H2>
|
|
|
|
<I>/proc/sys</I>
|
|
|
|
<BR>
|
|
|
|
<I>/etc/sysctl.conf</I>
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?5+sysctl.conf">sysctl.conf</A></B>(5)
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?7+regex">regex</A></B>(7)
|
|
|
|
<A NAME="lbAJ"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
George Staikos
|
|
|
|
<A NAME="lbAK"> </A>
|
|
<H2>REPORTING BUGS</H2>
|
|
|
|
Please send bug reports to
|
|
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="22"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="23"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="24"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="25"><A HREF="#lbAE">PARAMETERS</A><DD>
|
|
<DT id="26"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="27"><A HREF="#lbAG">DEPRECATED PARAMETERS</A><DD>
|
|
<DT id="28"><A HREF="#lbAH">FILES</A><DD>
|
|
<DT id="29"><A HREF="#lbAI">SEE ALSO</A><DD>
|
|
<DT id="30"><A HREF="#lbAJ">AUTHOR</A><DD>
|
|
<DT id="31"><A HREF="#lbAK">REPORTING BUGS</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:16 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|