Systeroid
A more powerful alternative to sysctl(8) with a terminal user interface 🐧
Install / Use
/learn @orhun/SysteroidREADME
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/ | - |
<!-- vim-markdown-toc GFM --> <!-- vim-markdown-toc -->
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
<details> <summary>Packaging status</summary> </details>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:
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
-a, --all display all variables (-A,-X)
-T, --tree display the variables in a tree-like format
-J, --json display the variables in JSON format
--deprecated include deprecated variables while listing
-e, --ignore ignore unknown variable errors
-N, --names print only variable names
-n, --values print only variable values
-b, --binary print only variable values wi
