{
    "mode": "man",
    "parameter": "sysctl",
    "section": "",
    "url": "https://www.chedong.com/phpMan.php/man/sysctl/json",
    "generated": "2026-08-07T07:14:01Z",
    "synopsis": "sysctl [options] [variable[=value]] [...]\nsysctl -p [file or regexp] [...]",
    "sections": {
        "NAME": {
            "content": "sysctl - configure kernel parameters at runtime\n",
            "subsections": []
        },
        "SYNOPSIS": {
            "content": "sysctl [options] [variable[=value]] [...]\nsysctl -p [file or regexp] [...]\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "sysctl  is  used  to modify kernel parameters at runtime.  The parameters available are those\nlisted under /proc/sys/.  Procfs is required for sysctl support in Linux.  You can use sysctl\nto both read and write sysctl data.\n",
            "subsections": []
        },
        "PARAMETERS": {
            "content": "variable\nThe name of a key to read from.  An example is kernel.ostype.  The  '/'  separator  is\nalso accepted in place of a '.'.\n\nvariable=value\nTo  set  a key, use the form variable=value where variable is the key and value is the\nvalue to set it to.  If the value contains quotes or characters which  are  parsed  by\nthe shell, you may need to enclose the value in double quotes.\n",
            "subsections": [
                {
                    "name": "-n --values",
                    "content": "Use this option to disable printing of the key name when printing values.\n",
                    "flag": "-n",
                    "long": "--values"
                },
                {
                    "name": "-e --ignore",
                    "content": "Use this option to ignore errors about unknown keys.\n",
                    "flag": "-e",
                    "long": "--ignore"
                },
                {
                    "name": "-N --names",
                    "content": "Use  this option to only print the names.  It may be useful with shells that have pro‐\ngrammable completion.\n",
                    "flag": "-N",
                    "long": "--names"
                },
                {
                    "name": "-q --quiet",
                    "content": "Use this option to not display the values set to stdout.\n",
                    "flag": "-q",
                    "long": "--quiet"
                },
                {
                    "name": "-w --write",
                    "content": "Force all arguments to be write arguments and print an error if they cannot be  parsed\nthis way.\n",
                    "flag": "-w",
                    "long": "--write"
                },
                {
                    "name": "-p --load",
                    "content": "Load  in  sysctl  settings  from the file specified or /etc/sysctl.conf if none given.\nSpecifying - as filename means reading data from standard  input.  Using  this  option\nwill  mean  arguments to sysctl are files, which are read in the order they are speci‐\nfied.  The file argument may be specified as regular expression.\n",
                    "flag": "-p",
                    "long": "--load"
                },
                {
                    "name": "-a --all",
                    "content": "Display all values currently available.\n",
                    "flag": "-a",
                    "long": "--all"
                },
                {
                    "name": "--deprecated",
                    "content": "Include deprecated parameters to --all values listing.\n",
                    "long": "--deprecated"
                },
                {
                    "name": "-b --binary",
                    "content": "Print value without new line.\n",
                    "flag": "-b",
                    "long": "--binary"
                },
                {
                    "name": "--system",
                    "content": "Load settings from all system configuration files. See the SYSTEM FILE PRECEDENCE sec‐\ntion below.\n",
                    "long": "--system"
                },
                {
                    "name": "-r --pattern _",
                    "content": "Only apply settings that match pattern.  The pattern uses extended regular  expression\nsyntax.\n",
                    "flag": "-r",
                    "long": "--pattern"
                },
                {
                    "name": "-A      -a",
                    "content": "",
                    "flag": "-a"
                },
                {
                    "name": "-d      -h",
                    "content": "",
                    "flag": "-h"
                },
                {
                    "name": "-f      -p",
                    "content": "",
                    "flag": "-p"
                },
                {
                    "name": "-X      -a",
                    "content": "",
                    "flag": "-a"
                },
                {
                    "name": "-o",
                    "content": "",
                    "flag": "-o"
                },
                {
                    "name": "-x",
                    "content": "",
                    "flag": "-x"
                },
                {
                    "name": "-h --help",
                    "content": "Display help text and exit.\n",
                    "flag": "-h",
                    "long": "--help"
                },
                {
                    "name": "-V --version",
                    "content": "Display version information and exit.\n",
                    "flag": "-V",
                    "long": "--version"
                }
            ]
        },
        "SYSTEM FILE PRECEDENCE": {
            "content": "When using the --system option, sysctl will read files from directories in the following list\nin given order from top to bottom. Once a file of a given filename is loaded, any file of the\nsame name in subsequent directories is ignored.\n\n/etc/sysctl.d/*.conf\n/run/sysctl.d/*.conf\n/usr/local/lib/sysctl.d/*.conf\n/usr/lib/sysctl.d/*.conf\n/lib/sysctl.d/*.conf\n/etc/sysctl.conf\n\nAll  configuration  files are sorted in lexicographic order, regardless of the directory they\nreside in. Configuration files can either be completely replaced (by having a new  configura‐\ntion  file  with  the  same name in a directory of higher priority) or partially replaced (by\nhaving a configuration file that is ordered later).\n",
            "subsections": []
        },
        "EXAMPLES": {
            "content": "/sbin/sysctl -a\n/sbin/sysctl -n kernel.hostname\n/sbin/sysctl -w kernel.domainname=\"example.com\"\n/sbin/sysctl -p/etc/sysctl.conf\n/sbin/sysctl -a --pattern forward\n/sbin/sysctl -a --pattern forward$\n/sbin/sysctl -a --pattern 'net.ipv4.conf.(eth|wlan)0.arp'\n/sbin/sysctl --pattern '^net.ipv6' --system\n",
            "subsections": []
        },
        "DEPRECATED PARAMETERS": {
            "content": "The basereachabletime and retranstime are deprecated.  The sysctl command does  not  allow\nchanging  values  of  these parameters.  Users who insist to use deprecated kernel interfaces\nshould push values to /proc file system by other means.  For example:\n\necho 256 > /proc/sys/net/ipv6/neigh/eth0/basereachabletime\n",
            "subsections": []
        },
        "FILES": {
            "content": "/proc/sys\n/etc/sysctl.d/*.conf\n/run/sysctl.d/*.conf\n/usr/local/lib/sysctl.d/*.conf\n/usr/lib/sysctl.d/*.conf\n/lib/sysctl.d/*.conf\n/etc/sysctl.conf\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "proc(5), sysctl.conf(5), regex(7)\n",
            "subsections": []
        },
        "AUTHOR": {
            "content": "\u001b]8;;staikos@0wned.org\u001b\\George Staikos\u001b]8;;\u001b\\\n",
            "subsections": []
        },
        "REPORTING BUGS": {
            "content": "Please send bug reports to \u001b]8;;procps@freelists.org\u001b\\procps@freelists.org\u001b]8;;\u001b\\\n\nprocps-ng                                    2023-08-19                                    SYSCTL(8)",
            "subsections": []
        }
    },
    "summary": "sysctl - configure kernel parameters at runtime",
    "flags": [],
    "examples": [
        "/sbin/sysctl -a",
        "/sbin/sysctl -n kernel.hostname",
        "/sbin/sysctl -w kernel.domainname=\"example.com\"",
        "/sbin/sysctl -p/etc/sysctl.conf",
        "/sbin/sysctl -a --pattern forward",
        "/sbin/sysctl -a --pattern forward$",
        "/sbin/sysctl -a --pattern 'net.ipv4.conf.(eth|wlan)0.arp'",
        "/sbin/sysctl --pattern '^net.ipv6' --system"
    ],
    "see_also": [
        {
            "name": "proc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
        },
        {
            "name": "sysctl.conf",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/sysctl.conf/5/json"
        },
        {
            "name": "regex",
            "section": "7",
            "url": "https://www.chedong.com/phpMan.php/man/regex/7/json"
        }
    ],
    "tldr": {
        "source": "official",
        "description": "List and change kernel runtime variables.",
        "examples": [
            {
                "description": "Show all available variables and their values",
                "command": "sysctl {{-a|--all}}"
            },
            {
                "description": "Set a changeable kernel state variable",
                "command": "sysctl {{-w|--write}} {{section.tunable}}={{value}}"
            },
            {
                "description": "Get currently open file handlers",
                "command": "sysctl fs.file-nr"
            },
            {
                "description": "Get limit for simultaneous open files",
                "command": "sysctl fs.file-max"
            },
            {
                "description": "Get the value of any runtime variable",
                "command": "sysctl {{variable_name}}"
            },
            {
                "description": "Print only the value without the variable name",
                "command": "sysctl {{-n|--values}} {{variable_name}}"
            },
            {
                "description": "Apply changes from `/etc/sysctl.conf`",
                "command": "sysctl {{-p|--load}}"
            }
        ]
    }
}