2025-03-14 21:59:59 -06:00
|
|
|
# sysctl
|
|
|
|
|
|
|
|
|
|
> List and change kernel runtime variables.
|
|
|
|
|
> More information: <https://manned.org/sysctl.8>.
|
|
|
|
|
|
|
|
|
|
- Show all available variables and their values:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`sysctl {{[-a|--all]}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Set a changeable kernel state variable:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`sysctl {{[-w|--write]}} {{section.tunable}}={{value}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- 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`:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`sysctl {{[-p|--load]}}`
|