sysctl

List and change kernel runtime variables. More information: <https://manned.org/sysctl.8>.

Install

All systems
curl cmd.cat/sysctl.sh
Debian Debian
apt-get install procps
Ubuntu
apt-get install procps
Alpine
apk add procps
Arch Arch Linux
pacman -S procps-ng
image/svg+xml Kali Linux
apt-get install procps
CentOS
yum install procps-ng
Fedora
dnf install procps-ng
Windows (WSL2)
sudo apt-get update sudo apt-get install procps
Raspbian
apt-get install procps
Docker
docker run cmd.cat/sysctl sysctl powered by Commando

List and change kernel runtime variables. More information: <https://manned.org/sysctl.8>.

  • Show all available variables and their values:
    sysctl -a
  • Set a changeable kernel state variable:
    sysctl -w section.tunable=value
  • 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`:
    sysctl -p

© tl;dr; authors and contributors