5.2. Configuring kernel parameters temporarily with sysctl
Use the sysctl command to temporarily set kernel parameters at runtime. The command is also useful for listing and filtering tunables.
Prerequisites
- You have root permissions on the system.
Procedure
List all parameters and their values.
# sysctl -a注意The
sysctl -acommand displays kernel parameters, which can be adjusted at runtime and at boot time.To configure a parameter temporarily, enter:
# sysctl <TUNABLE_CLASS>.<PARAMETER>=<TARGET_VALUE>This sample changes the parameter value while the system is running. The changes take effect immediately and it does not require system reboot.
注意The changes return back to default after your system reboots.