sysctl
system administrationLinux
The sysctl command is one of the most frequently used commands in Linux/Unix-like operating systems. sysctl Configure kernel parameters at runtime
Quick Reference
Command Name:
sysctl
Category:
system administration
Platform:
Linux
Basic Usage:
sysctl [options] [arguments]
Common Use Cases
Syntax
sysctl [options] [variable[=value]] [...]
Options
Option | Description |
---|---|
-a, --all |
Display all variables |
-A |
Alias of -a |
--deprecated |
Include deprecated parameters to --all |
-b, --binary |
Print values without new line |
-e, --ignore |
Ignore unknown variables errors |
-N, --names |
Print variable names only |
-n, --values |
Print values only |
-p, --load[=FILE] |
Read values from file |
-q, --quiet |
Do not display variable changes |
--system |
Read settings from all system configuration files |
-r, --pattern PATTERN |
Only apply settings matching pattern |
-w, --write |
Change sysctl setting |
-o |
Doesn't print variable name when printing values |
-d |
Show help instead of setting a variable |
-h, --help |
Display help and exit |
-V, --version |
Output version information and exit |
Examples
How to Use These Examples
The examples below show common ways to use the sysctl
command. Try them in your terminal to see the results. You can copy any example by clicking on the code block.
# Basic Examples Basic
# Display all kernel parameters
sysctl -a