百科.dev
全部条目AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
S

systeroid

> 编程语言
开源

一个具有终端用户界面的、比 sysctl(8) 更强大的替代方案

1.5K stars0 点赞0 次浏览
访问官网GitHub

工具介绍

一个具有终端用户界面的、比 sysctl(8) 更强大的替代方案

systeroid — A more powerful alternative to sysctl(8).

sysctl(8) is a utility on Unix-like operating systems that is used to read and modify the attributes of the kernel such as its version number, maximum limits, and security settings*. systeroid is "sysctl on steroids". It can do everything that sysctl does and even more. It provides a safer, more performant, and user-friendly CLI/TUI for managing the kernel parameters at runtime.





systeroid is implemented using procfs which is the virtual file system that is typically mapped to a mount point named /proc at boot time. This means checking the value of some kernel parameter requires opening a file in this virtual filesystem, reading its contents, parsing them, and closing the file. In Linux, these dynamically configurable kernel options are available under /proc/sys which contains directories representing the sections of the kernel and readable/writable virtual files. For example, to enable/disable IP forwarding, 1 or 0 could be written in /proc/sys/net/ipv4/ip_forward or systeroid ip_forward=1 command can be used to change the value of the parameter.

Although systeroid does not need the parameter section to be specified explicitly, it is important to know the sections and their areas of impact. Here are the available kernel sections according to the Linux kernel documentation:

Section Path Description
abi /proc/sys/abi/ execution domains & personalities
fs /proc/sys/fs/ filesystem settings
kernel /proc/sys/kernel/ global kernel information / miscellaneous settings
net /proc/sys/net/ networking settings
sunrpc /proc/sys/sunrpc/ SUN Remote Procedure Call settings
user /proc/sys/user/ user namespace limits
vm /proc/sys/vm/ memory management tuning buffer and cache management settings
dev /proc/sys/dev/ device specific information
debug /proc/sys/debug/ -

  • Requirements
  • Installation
    • Cargo
    • Arch Linux
    • Alpine Linux
    • Binary releases
    • Building from source
    • Docker
      • Images
      • Usage
      • Building
  • Usage
    • Options
    • Examples
      • Listing parameters
      • Filtering by section
      • Displaying values
      • Setting values
      • Loading values from a file
      • Loading values from the system directories
      • Searching parameters
      • Showing information about parameters
      • Verbose logging
  • TUI
    • Usage
    • Key Bindings
    • Examples
      • Launching
      • Showing help
      • Scrolling
      • Toggling the kernel section
      • Searching
      • Setting values
      • Saving values
      • Running commands
      • Copying to clipboard
      • Changing the colors
      • Viewing the parameter documentation
      • Setting the refresh rate
      • Logging
  • Configuration
  • Resources
    • References
    • Logo
    • Social Links
    • In The Media
    • Funding
  • Contributing
  • License
  • Copyright

Requirements

  • Rust (>=1.64.0) (see building from source)
  • libxcb (for clipboard support)
  • linux-documentation (for viewing the documentation)

To install the runtime dependencies:

  • on Arch Linux: pacman -S libxcb libxkbcommon linux-docs
  • on Debian/Ubuntu: apt-get install libx11-dev libxcb-shape0-dev libxcb-xfixes0-dev libxkbcommon-dev linux-doc
  • on Fedora: dnf install libX11-devel kernel-doc

Installation

Packaging status

Cargo

systeroid is available on crates.io:

cargo install systeroid
cargo install systeroid-tui

Arch Linux

systeroid can be installed from the community repository using pacman:

pacman -S systeroid

Alpine Linux

systeroid is available for Alpine Edge. It can be installed via apk after enabling the community repository.

apk add systeroid

Binary releases

See available releases that are automated by Continuous Deployment workflow.

Building from source

# clone the repository
git clone https://github.com/orhun/systeroid && cd systeroid/

# binaries will be located at:
# - target/release/systeroid
# - target/release/systeroid-tui
CARGO_TARGET_DIR=target cargo build --release

Also see requirements.

Docker

Images

Docker builds are automated and images are available in the following registries:

  • Docker Hub
  • GitHub Container Registry

Usage

The following command can be used to interactively view the documentation of selected parameters:

docker run --rm -it "orhunp/systeroid:${TAG:-latest}" --tui

Docker containers share the host system's kernel and its settings thus access to /proc and /sys are restricted for security. That is why it is not possible (and not recommended) to tweak the kernel parameters within a container. *

Building

Custom Docker images can be built from the Dockerfile:

docker build -t systeroid .

Usage

systeroid [options] [variable[=value] ...] --load[=<file>]

Options

…

Most of the arguments/flags are inherited from sysctl so they have the same functionality.

Examples

Listing parameters

# list all parameters
systeroid -A

# list parameters in a tree-like format
systeroid -T

# list parameters in JSON format
systeroid -J

To disable colors, set the NO_COLOR environment variable.

Filtering by section

# only list parameters in the "kernel" section
systeroid kernel

# only list parameters in the "vm" and "user" sections
systeroid vm user

Displaying values

# print the name and value of a parameter (in "name=value" format)
systeroid kernel.hostname

# print only the value of a parameter
systeroid -n kernel.hostname

# print the name and values of the multiple parameters
systeroid kernel.hostname user.max_user_namespaces

Setting values

# set the value of a parameter
systeroid kernel.domainname="example.com"

# set the values of multiple parameters and ignore errors
systeroid -e kernel.dmesg_restrict=0 vm.panic_on_oom=1 unknown_param="test"

# set the values of multiple parameters and enforce the "name=value" format
systeroid -w fs.dir-notify-enable=1 net.mptcp.enabled=1 vm.oom_kill_allocating_task

Loading values from a file

Parameter values can be set from an INI file.

sysctl.conf:

# Use kernel.sysrq = 1 to allow all keys.
# See https://www.kernel.org/doc/html/latest/admin-guide/sysrq.html for a list
# of values and keys.
kernel.sysrq = 16

# Append the PID to the core filename
kernel.core_uses_pid = 1

; Enable hard and soft link protection
; (If a line begins with a single '-', any attempts to set the value that fail will be ignored.)
-fs.protected_hardlinks = 1
fs.protected_symlinks = 1

To load it:

systeroid --load sysctl.conf

If no file is given, values are loaded from /etc/sysctl.conf as default:

systeroid --load

Specifying "-" as file name means reading data from standard input:

systeroid --load -

Loading values from the system directories

The list of default system directories are the following:

  • /etc/sysctl.d
  • /run/sysctl.d
  • /usr/local/lib/sysctl.d
  • /usr/lib/sysctl.d
  • /lib/sysctl.d
  • /etc/sysctl.conf

Use --system flag to load the files with ".conf" extension in these directories:

systeroid --system

Searching parameters

# search parameters using regex patterns
systeroid -r 'net.ipv4.conf.(eth|wlan)0.arp'
systeroid -r '^net.ipv6'

Example output of combining search with listing:

$ systeroid --names --pattern 'kernel.*_max$' --tree

kernel
├── ngroups_max
├── pid_max
└── sched_util_clamp_max

Showing information about parameters

systeroid can dump the parameter information from the kernel documentation. This is useful if you don't know what a parameter is used for.

# show information about a parameter
systeroid --explain oom_dump_tasks

Kernel documentation should be present in one of the following paths for parsing upon first launch:

  • /usr/share/doc/linux
  • /usr/share/doc/linux-doc
  • /usr/share/doc/linux-docs
  • /usr/share/doc/kernel-doc-*/Documentation

Then the parsed data is cached in $HOME/.cache/systeroid-core and used from there as long as the documentation is not updated. The caching mechanism can be disabled via setting the NO_CACHE environment variable.

This is a design choice due to the fact that different versions of kernels might be installed on different systems so the documentation might be too new or old if systeroid was to be shipped with a fixed set of parameter descriptions bundled in. With the parsing approach, documentation is always kept up-to-date.

However, this

Issues· 17 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rusthacktoberfestkernel-parameterslinuxlinux-kernel

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言