LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

sysctl

View and modify kernel parameters

TLDR

Show all available variables and their values
$ sysctl -a
copy
Set a changeable kernel state variable
$ sysctl -w [section.tunable]=[value]
copy
Get currently open file handlers
$ sysctl fs.file-nr
copy
Get limit for simultaneous open files
$ sysctl fs.file-max
copy
Apply changes from /etc/sysctl.conf
$ sysctl -p
copy

SYNOPSIS

sysctl [options] [variable[=value]] ...

DESCRIPTION

sysctl is used to examine and modify kernel parameters at runtime. Parameters available are listed under /proc/sys/ and can be read or written using this tool.Common categories include kernel. (core kernel settings), net. (networking), vm. (virtual memory), and fs. (filesystem). Changes made with sysctl are temporary unless persisted to configuration files.

PARAMETERS

-a, --all

Display all available variables
-w, --write
Write value to variable
-p, --load [_file_]
Load settings from file (default: /etc/sysctl.conf)
-n, --values
Print only values, not variable names
-e, --ignore
Ignore unknown variables
-q, --quiet
Suppress error messages
--system
Load settings from all system configuration files

CONFIGURATION

/etc/sysctl.conf

Main configuration file for persistent kernel parameter settings, loaded at boot.
**/etc/sysctl.d/*.conf**
Drop-in directory for modular kernel parameter configuration files.

INSTALL

sudo apt install procps
copy
sudo dnf install procps-ng
copy
sudo pacman -S procps-ng
copy
sudo apk add procps-ng
copy
sudo zypper install procps
copy
brew install procps
copy
nix profile install nixpkgs#procps
copy

CAVEATS

Changes are lost on reboot unless saved to /etc/sysctl.conf or files in /etc/sysctl.d/. Some parameters are read-only. Incorrect values can destabilize the system. Requires root privileges to modify values.

HISTORY

sysctl is part of procps (now procps-ng). It provides a convenient interface to the /proc/sys virtual filesystem for reading and writing kernel parameters at runtime.

SEE ALSO

proc(5)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid