Listing Configurable Kernel Parameters and Values

Use the sysctl command to browse kernel system parameters that are defined in the /proc/sys virtual file system. The following methods of viewing kernel parameters and their values by using the sysctl command are available:

  • Run sysctl -a to view all available kernel parameters and their values for the running kernel.
    sysctl -a
    kernel.sched_child_runs_first = 0
    kernel.sched_min_granularity_ns = 2000000
    kernel.sched_latency_ns = 10000000
    kernel.sched_wakeup_granularity_ns = 2000000
    kernel.sched_shares_ratelimit = 500000
    ...

    Note:

    The delimiter character in the name of a setting is a period (.) rather than a slash (/) in a path relative to /proc/sys, such as net.ipv4.ip_forward. This setting represents net/ipv4/ip_forward. As another example, kernel.msgmax represents kernel/msgmax.

  • Display an individual setting or a collection of settings by specifying its name as the argument to sysctl.
    sysctl net.ipv4.ip_forward
    net.ipv4.ip_forward = 0
    For a broader collection of settings, you can specify the name of a collection of settings earlier in the naming hierarchy:
    sysctl net.ipv4.conf.all
    net.ipv4.conf.all.accept_local = 0
    net.ipv4.conf.all.accept_redirects = 0
    net.ipv4.conf.all.accept_source_route = 0
    net.ipv4.conf.all.arp_accept = 0
    net.ipv4.conf.all.arp_announce = 0
    net.ipv4.conf.all.arp_filter = 0
    net.ipv4.conf.all.arp_ignore = 0
    net.ipv4.conf.all.arp_notify = 0
    net.ipv4.conf.all.bc_forwarding = 0
    net.ipv4.conf.all.bootp_relay = 0
    net.ipv4.conf.all.disable_policy = 0
    net.ipv4.conf.all.disable_xfrm = 0
    net.ipv4.conf.all.drop_gratuitous_arp = 0
    net.ipv4.conf.all.drop_unicast_in_l2_multicast = 0
    net.ipv4.conf.all.force_igmp_version = 0
    net.ipv4.conf.all.forwarding = 0
    net.ipv4.conf.all.igmpv2_unsolicited_report_interval = 10000
    net.ipv4.conf.all.igmpv3_unsolicited_report_interval = 1000
    net.ipv4.conf.all.ignore_routes_with_linkdown = 0
    net.ipv4.conf.all.log_martians = 0
    net.ipv4.conf.all.mc_forwarding = 0
    net.ipv4.conf.all.medium_id = 0
    net.ipv4.conf.all.promote_secondaries = 0
    net.ipv4.conf.all.proxy_arp = 0
    net.ipv4.conf.all.proxy_arp_pvlan = 0
    net.ipv4.conf.all.route_localnet = 0
    net.ipv4.conf.all.rp_filter = 0
    net.ipv4.conf.all.secure_redirects = 1
    net.ipv4.conf.all.send_redirects = 0
    net.ipv4.conf.all.shared_media = 1
    net.ipv4.conf.all.src_valid_mark = 0
    net.ipv4.conf.all.tag = 0