A very good question.
Basically kernel parameter can be changed during runtime.
However, not every kernel parameter can or should be changed.
There are at least two locations where you can see or modify such parameters:
/sys # sysfs; information about devices, drivers, and some kernel features, only a few writeable, mostly readonly
/proc # procfs; process and system information, mostly writable
You can find and change certain kernel parameter by editing those files.
They don’t survive a reboot and many only apply to new sessions or new started processes.
Lets say you change a process limit, an already running process and its children still use the old limit.
But this depends on the setting.
For example, you can switch on/off Hyperthreading in runtime by this commands:
echo off > /sys/devices/system/cpu/smt/control
echo on > /sys/devices/system/cpu/smt/control
for details see
man 5 procfs
man 5 sysfs
That was kind of the old way.
Newer way:
You also can change kernel parameter using the command “sysctl”.
man sysctl
sysctl -a
sysctl --system
and so on.
Using sysctl is the “new” way to handle it.
You can search for a parameter easily for example by:
sysctl -a 2> /dev/null | grep ipv6 | grep disable
And then you can change something by
sysctl -w net.ipv6.conf.all.disable_ipv6=1
To make changes permanent, place an additional file into
/etc/sysctl.d/
Can look like:
touch /etc/sysctl.d/90-ipv6.conf
And use an editor of you choice to add something like:
cat /etc/sysctl.d/90-ipv6.conf
# Disable IPv6
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
The Documentation can be found at kernel.org, like
The Linux kernel user’s and administrator’s guide — The Linux Kernel documentation
Documentation for /proc/sys — The Linux Kernel documentation
IPv6 — The Linux Kernel documentation
IP Sysctl — The Linux Kernel documentation
The kernel’s command-line parameters — The Linux Kernel documentation
…
Edit
to be more detailed