1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:47:44 +00:00

sysctl: Allow showing or setting multiple variables

The `-w` option is enforced when setting variables.
This commit is contained in:
SeekingBlues 2021-10-16 18:18:38 -04:00 committed by Andreas Kling
parent 3d174e3ad2
commit 638f39fbc1
2 changed files with 81 additions and 67 deletions

View file

@ -5,7 +5,7 @@ sysctl - configure kernel parameters at runtime
## Synopsis
```**sh
# sysctl [-a] [variable[=value]]
# sysctl [-a] [-w] [variable[=value]...]
```
## Description
@ -16,12 +16,13 @@ Available parameters are listed under /proc/sys/.
## Options
* `-a`: Display all kernel parameters and associated values
* `-a`: Display all kernel parameters and associated values.
* `-w`: Set kernel parameters to the specified values.
## Arguments
* `variable`: Retrieve the specified parameter
* `variable=value`: Set the specified parameter to the specified value
* `variable`: Retrieve the specified parameter.
* `variable=value`: Set the specified parameter to the specified value. The option `-w` has to be specified.
## Files
@ -43,8 +44,10 @@ ubsan_is_deadly = 1
```
Set `ubsan_is_deadly` parameter to zero (disabled):
(Note: This requires root privileges)
```sh
# sysctl ubsan_is_deadly=0
ubsan_is_deadly = 1 -> 0
# su
# sysctl -w ubsan_is_deadly=0
ubsan_is_deadly: 1 -> 0
```