• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

sysctl: command not found

by admin

To view or edit any security-related parameter of Linux kernel, there is the /etc/sysctl.conf file. All the parameters are stored in this file and this is read during boot time. If you wish to see the available kernel parameters in this file, you can do so by running the command:

# sysctl -a

This command will display an extensive list of configuration settings. The kernel security parameters are also in this list.

Syntax

The syntax of the sysctl command is:

# sysctl [options]

It has various options, as defined in the following table.

Option Description
-a Display all parameters and their current values.
-w {parameter}={value} Set a parameter value.
-p [file name] Load sysctl settings from the specified file, or /etc/sysctl.conf if no file name is provided.
-e Ignore errors about unknown keys.
-r {pattern} Apply a command to parameters matching a given pattern, using extended regular expressions.

If you encounter the below error while running the sysctl command:

sysctl: command not found

you may try installing the below package as per your choice of distribution:

OS Distribution Command
Debian apt-get install procps
Ubuntu apt-get install procps
Alpine apk add procps
Arch Linux pacman -S procps-ng
Kali Linux apt-get install procps
CentOS yum install procps-ng
Fedora dnf install procps-ng
Raspbian apt-get install procps

sysctl Command Examples

1. Show all available variables and their values:

# sysctl -a

2. Set a changeable kernel state variable:

# sysctl -w section.tunable=value

3. Get currently open file handlers:

# sysctl fs.file-nr

4. Get limit for simultaneous open files:

# sysctl fs.file-max

5. Apply changes from `/etc/sysctl.conf`:

# sysctl -p

Filed Under: Linux

Some more articles you might also be interested in …

  1. ntpq Command Examples in Linux
  2. “git svn” Command Examples
  3. acpi: command not found
  4. iwconfig: command not found
  5. add-apt-repository Command Examples
  6. arp-scan: Send ARP packets to hosts (specified as IP addresses or hostnames) to scan the local network
  7. nslookup: command not found
  8. rfkill Command Examples in Linux
  9. grub-mkconfig Command Options
  10. kpackagetool5: command not found

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright