sysctl

>Usage

Shows the kernel state for the specified state, also allows the super user to set the kernel state by supplying a new value.

>Synopsis

sysctl [option] [variable]

>Options

-a

Lists all currently available values except those opaque or excluded from listing.

Example 1:

Dots

-zsh

> sysctl -a


prints a list of values.

-b

Forces the variable value to output in binary format.

Example 2:

Dots

-zsh

>sysctl -b kern.maxfiles


12288

-d

Prints the variable description instead of the name.

Example 3:

Dots

-zsh

>sysctl -d kern.maxfiles


kern.maxfiles: maximum number of open files

-e

Separates the name and value of the variable.

Example 4:

Dots

-zsh

>sysctl -e kern.maxfiles


kern.maxfiles=12288

-f [filename]

Specifies a file with a pair of name and value for each line, processing each of them.

Example 5:

Dots

-zsh

>sysctl -f sysctl.conf


prints an output that will depend on the contents of sysctl.conf, which would contain name=value pairs.

-h

Makes the output human readable.

Example 6:

Dots

-zsh

>sysctl -h kern.maxfiles


12288 open files

>Quiz

Progress: Question ? out of ?

Question Title

Page written by Matthias Tugcu