{
    "mode": "man",
    "parameter": "proc_sys_kernel",
    "section": "5",
    "url": "https://www.chedong.com/phpMan.php/man/proc_sys_kernel/5/json",
    "generated": "2026-10-04T08:07:15Z",
    "sections": {
        "NAME": {
            "content": "/proc/sys/kernel/ - control a range of kernel parameters\n",
            "subsections": []
        },
        "DESCRIPTION": {
            "content": "/proc/sys/kernel/\nThis  directory  contains files controlling a range of kernel parameters, as described\nbelow.\n\n/proc/sys/kernel/acct\nThis file contains three numbers: highwater, lowwater, and  frequency.   If  BSD-style\nprocess  accounting  is  enabled, these values control its behavior.  If free space on\nfilesystem where the log lives goes below lowwater percent, accounting  suspends.   If\nfree space gets above highwater percent, accounting resumes.  frequency determines how\noften  the kernel checks the amount of free space (value is in seconds).  Default val‐\nues are 4, 2, and 30.  That is, suspend accounting if 2% or less space is free; resume\nit if 4% or more space is free; consider information about amount of free space  valid\nfor 30 seconds.\n\n/proc/sys/kernel/automsgmni (Linux 2.6.27 to Linux 3.18)\nFrom  Linux  2.6.27  to  Linux  3.18, this file was used to control recomputing of the\nvalue in /proc/sys/kernel/msgmni upon the addition or removal of memory  or  upon  IPC\nnamespace  creation/removal.   Echoing \"1\" into this file enabled msgmni automatic re‐\ncomputing (and triggered a recomputation of msgmni based  on  the  current  amount  of\navailable memory and number of IPC namespaces).  Echoing \"0\" disabled automatic recom‐\nputing.   (Automatic  recomputing was also disabled if a value was explicitly assigned\nto /proc/sys/kernel/msgmni.)  The default value in automsgmni was 1.\n\nSince Linux 3.19, the content of this file has no effect (because msgmni  defaults  to\nnear  the  maximum  value  possible), and reads from this file always return the value\n\"0\".\n\n/proc/sys/kernel/caplastcap (since Linux 3.2)\nSee capabilities(7).\n\n/proc/sys/kernel/cap-bound (from Linux 2.2 to Linux 2.6.24)\nThis file holds the value of the kernel capability bounding set (expressed as a signed\ndecimal number).  This set is ANDed against the capabilities permitted  to  a  process\nduring execve(2).  Starting with Linux 2.6.25, the system-wide capability bounding set\ndisappeared, and was replaced by a per-thread bounding set; see capabilities(7).\n\n/proc/sys/kernel/corepattern\nSee core(5).\n\n/proc/sys/kernel/corepipelimit\nSee core(5).\n\n/proc/sys/kernel/coreusespid\nSee core(5).\n\n/proc/sys/kernel/ctrl-alt-del\nThis  file controls the handling of Ctrl-Alt-Del from the keyboard.  When the value in\nthis file is 0, Ctrl-Alt-Del is trapped and sent to the init(1) program  to  handle  a\ngraceful  restart.   When the value is greater than zero, Linux's reaction to a Vulcan\nNerve Pinch (tm) will be an immediate reboot, without even syncing its dirty  buffers.\nNote: when a program (like dosemu) has the keyboard in \"raw\" mode, the Ctrl-Alt-Del is\nintercepted by the program before it ever reaches the kernel tty layer, and it's up to\nthe program to decide what to do with it.\n\n/proc/sys/kernel/dmesgrestrict (since Linux 2.6.37)\nThe value in this file determines who can see kernel syslog contents.  A value of 0 in\nthis  file imposes no restrictions.  If the value is 1, only privileged users can read\nthe kernel syslog.  (See syslog(2) for more details.)  Since  Linux  3.4,  only  users\nwith the CAPSYSADMIN capability may change the value in this file.\n\n/proc/sys/kernel/domainname and /proc/sys/kernel/hostname\ncan  be  used to set the NIS/YP domainname and the hostname of your box in exactly the\nsame way as the commands domainname(1) and hostname(1), that is:\n\n# echo 'darkstar' > /proc/sys/kernel/hostname\n# echo 'mydomain' > /proc/sys/kernel/domainname\n\nhas the same effect as\n\n# hostname 'darkstar'\n# domainname 'mydomain'\n\nNote, however, that the classic darkstar.frop.org has the hostname \"darkstar\" and  DNS\n(Internet  Domain  Name Server) domainname \"frop.org\", not to be confused with the NIS\n(Network Information Service) or YP (Yellow Pages) domainname.  These two domain names\nare in general different.  For a detailed discussion see the hostname(1) man page.\n\n/proc/sys/kernel/hotplug\nThis file contains the pathname for the hotplug policy agent.  The  default  value  in\nthis file is /sbin/hotplug.\n\n/proc/sys/kernel/htab-reclaim (before Linux 2.4.9.2)\n(PowerPC  only)  If  this file is set to a nonzero value, the PowerPC htab (see kernel\nfile Documentation/powerpc/ppchtab.txt) is pruned each time the system hits the  idle\nloop.\n\n/proc/sys/kernel/keys/\nThis  directory  contains various files that define parameters and limits for the key-\nmanagement facility.  These files are described in keyrings(7).\n\n/proc/sys/kernel/kptrrestrict (since Linux 2.6.38)\nThe value in this file determines whether kernel addresses are exposed via /proc files\nand other interfaces.  A value of 0 in this file  imposes  no  restrictions.   If  the\nvalue  is  1,  kernel pointers printed using the %pK format specifier will be replaced\nwith zeros unless the user has the CAPSYSLOG capability.  If the value is  2,  kernel\npointers printed using the %pK format specifier will be replaced with zeros regardless\nof  the  user's  capabilities.  The initial default value for this file was 1, but the\ndefault was changed to 0 in Linux 2.6.39.   Since  Linux  3.4,  only  users  with  the\nCAPSYSADMIN capability can change the value in this file.\n\n/proc/sys/kernel/l2cr\n(PowerPC  only)  This  file contains a flag that controls the L2 cache of G3 processor\nboards.  If 0, the cache is disabled.  Enabled if nonzero.\n\n/proc/sys/kernel/modprobe\nThis file contains the pathname for the kernel module loader.  The  default  value  is\n/sbin/modprobe.   The file is present only if the kernel is built with the CONFIGMOD‐\nULES (CONFIGKMOD in Linux 2.6.26 and earlier) option enabled.  It is described by the\nLinux kernel source file Documentation/kmod.txt (present only in Linux  2.4  and  ear‐\nlier).\n\n/proc/sys/kernel/modulesdisabled (since Linux 2.6.31)\nA  toggle value indicating if modules are allowed to be loaded in an otherwise modular\nkernel.  This toggle defaults to off (0), but can be set true (1).  Once true, modules\ncan be neither loaded nor unloaded, and the toggle cannot be set back to  false.   The\nfile is present only if the kernel is built with the CONFIGMODULES option enabled.\n\n/proc/sys/kernel/msgmax (since Linux 2.2)\nThis file defines a system-wide limit specifying the maximum number of bytes in a sin‐\ngle message written on a System V message queue.\n\n/proc/sys/kernel/msgmni (since Linux 2.4)\nThis  file  defines  the system-wide limit on the number of message queue identifiers.\nSee also /proc/sys/kernel/automsgmni.\n\n/proc/sys/kernel/msgmnb (since Linux 2.2)\nThis file defines a system-wide parameter used to initialize  the  msgqbytes  setting\nfor subsequently created message queues.  The msgqbytes setting specifies the maximum\nnumber of bytes that may be written to the message queue.\n\n/proc/sys/kernel/ngroupsmax (since Linux 2.6.4)\nThis  is  a  read-only file that displays the upper limit on the number of a process's\ngroup memberships.\n\n/proc/sys/kernel/nslastpid (since Linux 3.3)\nSee pidnamespaces(7).\n\n/proc/sys/kernel/ostype and /proc/sys/kernel/osrelease\nThese files give substrings of /proc/version.\n\n/proc/sys/kernel/overflowgid and /proc/sys/kernel/overflowuid\nThese files duplicate the files /proc/sys/fs/overflowgid and /proc/sys/fs/overflowuid.\n\n/proc/sys/kernel/panic\nThis file gives read/write access to the kernel variable panictimeout.   If  this  is\nzero, the kernel will loop on a panic; if nonzero, it indicates that the kernel should\nautoreboot  after  this  number of seconds.  When you use the software watchdog device\ndriver, the recommended setting is 60.\n\n/proc/sys/kernel/paniconoops (since Linux 2.5.68)\nThis file controls the kernel's behavior when an oops or BUG is encountered.  If  this\nfile  contains 0, then the system tries to continue operation.  If it contains 1, then\nthe system delays a few seconds (to give klogd time to record  the  oops  output)  and\nthen  panics.   If  the  /proc/sys/kernel/panic file is also nonzero, then the machine\nwill be rebooted.\n\n/proc/sys/kernel/pidmax (since Linux 2.5.34)\nThis file specifies the value at which PIDs wrap around (i.e., the value in this  file\nis one greater than the maximum PID).  PIDs greater than this value are not allocated;\nthus,  the  value in this file also acts as a system-wide limit on the total number of\nprocesses and threads.  The default value for this file, 32768, results  in  the  same\nrange  of PIDs as on earlier kernels.  On 32-bit platforms, 32768 is the maximum value\nfor pidmax.  On 64-bit  systems,  pidmax  can  be  set  to  any  value  up  to  2^22\n(PIDMAXLIMIT, approximately 4 million).\n\n/proc/sys/kernel/powersave-nap (PowerPC only)\nThis  file contains a flag.  If set, Linux-PPC will use the \"nap\" mode of powersaving,\notherwise the \"doze\" mode will be used.\n\n/proc/sys/kernel/printk\nSee syslog(2).\n\n/proc/sys/kernel/pty (since Linux 2.6.4)\nThis directory contains two files relating to the number of  UNIX  98  pseudoterminals\n(see pts(4)) on the system.\n\n/proc/sys/kernel/pty/max\nThis file defines the maximum number of pseudoterminals.\n\n/proc/sys/kernel/pty/nr\nThis read-only file indicates how many pseudoterminals are currently in use.\n\n/proc/sys/kernel/random/\nThis  directory  contains  various  parameters  controlling  the operation of the file\n/dev/random.  See random(4) for further information.\n\n/proc/sys/kernel/random/uuid (since Linux 2.4)\nEach read from this read-only file returns a randomly generated  128-bit  UUID,  as  a\nstring in the standard UUID format.\n\n/proc/sys/kernel/randomizevaspace (since Linux 2.6.12)\nSelect  the address space layout randomization (ASLR) policy for the system (on archi‐\ntectures that support ASLR).  Three values are supported for this file:\n\n0      Turn ASLR off.  This is the default for architectures that don't support  ASLR,\nand when the kernel is booted with the norandmaps parameter.\n\n1      Make the addresses of mmap(2) allocations, the stack, and the VDSO page random‐\nized.   Among  other things, this means that shared libraries will be loaded at\nrandomized addresses.  The text segment of PIE-linked  binaries  will  also  be\nloaded  at  a  randomized address.  This value is the default if the kernel was\nconfigured with CONFIGCOMPATBRK.\n\n2      (Since Linux 2.6.25) Also support heap randomization.  This value  is  the  de‐\nfault if the kernel was not configured with CONFIGCOMPATBRK.\n\n/proc/sys/kernel/real-root-dev\nThis file is documented in the Linux kernel source file Documentation/admin-guide/ini‐\ntrd.rst (or Documentation/initrd.txt before Linux 4.10).\n\n/proc/sys/kernel/reboot-cmd (Sparc only)\nThis  file  seems  to be a way to give an argument to the SPARC ROM/Flash boot loader.\nMaybe to tell it what to do after rebooting?\n\n/proc/sys/kernel/rtsig-max\n(Up to and including Linux 2.6.7; see setrlimit(2)) This file can be used to tune  the\nmaximum number of POSIX real-time (queued) signals that can be outstanding in the sys‐\ntem.\n\n/proc/sys/kernel/rtsig-nr\n(Up to and including Linux 2.6.7.)  This file shows the number of POSIX real-time sig‐\nnals currently queued.\n\n/proc/pid/schedautogroupenabled (since Linux 2.6.38)\nSee sched(7).\n\n/proc/sys/kernel/schedchildrunsfirst (since Linux 2.6.23)\nIf  this  file  contains  the  value  zero, then, after a fork(2), the parent is first\nscheduled on the CPU.  If the file contains a nonzero value, then the child is  sched‐\nuled  first  on  the  CPU.  (Of course, on a multiprocessor system, the parent and the\nchild might both immediately be scheduled on a CPU.)\n\n/proc/sys/kernel/schedrrtimeslicems (since Linux 3.9)\nSee schedrrgetinterval(2).\n\n/proc/sys/kernel/schedrtperiodus (since Linux 2.6.25)\nSee sched(7).\n\n/proc/sys/kernel/schedrtruntimeus (since Linux 2.6.25)\nSee sched(7).\n\n/proc/sys/kernel/seccomp/ (since Linux 4.14)\nThis directory provides additional seccomp information and  configuration.   See  sec‐\ncomp(2) for further details.\n\n/proc/sys/kernel/sem (since Linux 2.4)\nThis  file  contains  4  numbers  defining  limits for System V IPC semaphores.  These\nfields are, in order:\n\nSEMMSL The maximum semaphores per semaphore set.\n\nSEMMNS A system-wide limit on the number of semaphores in all semaphore sets.\n\nSEMOPM The maximum number of operations that may be specified in a semop(2) call.\n\nSEMMNI A system-wide limit on the maximum number of semaphore identifiers.\n\n/proc/sys/kernel/sg-big-buff\nThis file shows the size of the generic SCSI device (sg) buffer.  You  can't  tune  it\njust  yet,  but  you  could change it at compile time by editing include/scsi/sg.h and\nchanging the value of SGBIGBUFF.  However, there shouldn't be any reason  to  change\nthis value.\n\n/proc/sys/kernel/shmrmidforced (since Linux 3.1)\nIf  this  file is set to 1, all System V shared memory segments will be marked for de‐\nstruction as soon as the number of attached processes falls to zero; in  other  words,\nit  is no longer possible to create shared memory segments that exist independently of\nany attached process.\n\nThe effect is as though a shmctl(2) IPCRMID is performed on all existing segments  as\nwell as all segments created in the future (until this file is reset to 0).  Note that\nexisting  segments  that are attached to no process will be immediately destroyed when\nthis file is set to 1.  Setting this option will also destroy segments that were  cre‐\nated,  but  never  attached,  upon termination of the process that created the segment\nwith shmget(2).\n\nSetting this file to 1 provides a way of ensuring that all System V shared memory seg‐\nments are counted against the resource usage and resource limits (see the  description\nof RLIMITAS in getrlimit(2)) of at least one process.\n\nBecause  setting  this  file to 1 produces behavior that is nonstandard and could also\nbreak existing applications, the default value in this file is 0.  Set this file to  1\nonly  if you have a good understanding of the semantics of the applications using Sys‐\ntem V shared memory on your system.\n\n/proc/sys/kernel/shmall (since Linux 2.2)\nThis file contains the system-wide limit on the total number  of  pages  of  System  V\nshared memory.\n\n/proc/sys/kernel/shmmax (since Linux 2.2)\nThis  file  can  be  used to query and set the run-time limit on the maximum (System V\nIPC) shared memory segment size that can be created.  Shared memory segments up  to  1\nGB are now supported in the kernel.  This value defaults to SHMMAX.\n\n/proc/sys/kernel/shmmni (since Linux 2.4)\nThis  file specifies the system-wide maximum number of System V shared memory segments\nthat can be created.\n\n/proc/sys/kernel/sysctlwritesstrict (since Linux 3.16)\nThe value in this file determines how the file offset affects the behavior of updating\nentries in files under /proc/sys.  The file has three possible values:\n\n-1  This provides legacy handling, with no printk warnings.  Each write(2) must  fully\ncontain  the  value to be written, and multiple writes on the same file descriptor\nwill overwrite the entire value, regardless of the file position.\n\n0   (default) This provides the same behavior as for -1, but printk warnings are writ‐\nten for processes that perform writes when the file offset is not 0.\n\n1   Respect the file offset when  writing  strings  into  /proc/sys  files.   Multiple\nwrites  will  append  to  the  value  buffer.  Anything written beyond the maximum\nlength of the value buffer will be ignored.  Writes to numeric  /proc/sys  entries\nmust  always  be  at  file  offset  0 and the value must be fully contained in the\nbuffer provided to write(2).\n\n/proc/sys/kernel/sysrq\nThis file controls the functions allowed to be invoked by the SysRq key.  By  default,\nthe  file  contains  1  meaning that every possible SysRq request is allowed (in older\nkernel versions, SysRq was disabled by default, and you were required to  specifically\nenable  it  at  run-time, but this is not the case any more).  Possible values in this\nfile are:\n\n0    Disable sysrq completely\n\n1    Enable all functions of sysrq\n\n> 1  Bit mask of allowed sysrq functions, as follows:\n2  Enable control of console logging level\n4  Enable control of keyboard (SAK, unraw)\n8  Enable debugging dumps of processes etc.\n16  Enable sync command\n32  Enable remount read-only\n64  Enable signaling of processes (term, kill, oom-kill)\n128  Allow reboot/poweroff\n256  Allow nicing of all real-time tasks\n\nThis file is present only if the CONFIGMAGICSYSRQ kernel configuration option is en‐\nabled.  For further  details  see  the  Linux  kernel  source  file  Documentation/ad‐\nmin-guide/sysrq.rst (or Documentation/sysrq.txt before Linux 4.10).\n\n/proc/sys/kernel/version\nThis file contains a string such as:\n\n#5 Wed Feb 25 21:49:24 MET 1998\n\nThe  \"#5\" means that this is the fifth kernel built from this source base and the date\nfollowing it indicates the time the kernel was built.\n\n/proc/sys/kernel/threads-max (since Linux 2.3.11)\nThis file specifies the system-wide limit on the number of threads (tasks) that can be\ncreated on the system.\n\nSince Linux 4.1, the value that can be written to threads-max is bounded.  The minimum\nvalue that can be written is 20.  The maximum value that can be written  is  given  by\nthe constant FUTEXTIDMASK (0x3fffffff).  If a value outside of this range is written\nto threads-max, the error EINVAL occurs.\n\nThe  value  written  is checked against the available RAM pages.  If the thread struc‐\ntures would occupy too much (more than 1/8th) of the available RAM pages,  threads-max\nis reduced accordingly.\n\n/proc/sys/kernel/yama/ptracescope (since Linux 3.5)\nSee ptrace(2).\n\n/proc/sys/kernel/zero-paged (PowerPC only)\nThis  file  contains a flag.  When enabled (nonzero), Linux-PPC will pre-zero pages in\nthe idle loop, possibly speeding up getfreepages.\n",
            "subsections": []
        },
        "SEE ALSO": {
            "content": "proc(5), procsys(5)\n\nLinux man-pages 6.7                          2023-09-30                           procsyskernel(5)",
            "subsections": []
        }
    },
    "summary": "/proc/sys/kernel/ - control a range of kernel parameters",
    "flags": [],
    "examples": [],
    "see_also": [
        {
            "name": "proc",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/proc/5/json"
        },
        {
            "name": "procsys",
            "section": "5",
            "url": "https://www.chedong.com/phpMan.php/man/procsys/5/json"
        }
    ]
}