commands.sh

sysctl

linuxmacos

List and change kernel runtime variables.

More info →

Options (3)

-a, --allboolean

Show all available variables and their values

Example: sysctl {{[-a|--all]}}
-w, --writeboolean

Set a changeable kernel state variable

Example: sysctl {{[-w|--write]}} {{section.tunable}}={{value}}
-p, --loadboolean

Apply changes from `/etc/sysctl.conf`

Example: sysctl {{[-p|--load]}}

Examples (5)

Show all available variables and their values

sysctl [-a|--all]

Set a changeable kernel state variable

sysctl [-w|--write] section.tunable=value

Get currently open file handlers

sysctl fs.file-nr

Get limit for simultaneous open files

sysctl fs.file-max

Apply changes from `/etc/sysctl.conf`

sysctl [-p|--load]
made by @shridhargupta | data from tldr-pages