mbox - Multi-call Binary Toolbox
Version: 0.1.0-alpha
A lightweight, single-binary multi-call utility suite for Linux — inspired by busybox, built with simplicity in mind.
Features
- 🔧 Single Binary — One executable, 133 applets via symlinks
- 📦 Zero Dependencies — Pure C, links against libc only
- ⚡ Fast & Small — Static builds under 2 MB
- 🔗 Symlink Dispatch — Run as
ls, cat, ps, etc.
- 📁 Relocatable Install —
mbox --install <dir> creates relative symlinks
- 🐧 Linux Native — Designed for embedded, containers, and minimal systems
- ℹ️ Built-in Help — Every applet supports
--help / -h
- 🔄 Shell Completions — Bash, fish, and zsh completions included
Applets
Core Utilities (22 applets)
| Applet |
Description |
echo |
Print arguments |
cat |
Concatenate files |
ls |
List directory contents |
pwd |
Print working directory |
env |
Print/set environment |
printenv |
Print environment variables |
true |
Return true (exit 0) |
false |
Return false (exit 1) |
yes |
Output string repeatedly |
sleep |
Sleep for duration |
uname |
Print system information |
basename |
Strip directory from path |
dirname |
Strip last path component |
id |
Print user identity |
whoami |
Print current username |
hostname |
Print/set hostname |
date |
Print/set date and time |
tee |
Read stdin, write to files |
clear |
Clear terminal |
reset |
Reset terminal |
agetty |
Alternative getty |
File Operations (21 applets)
| Applet |
Description |
mkdir |
Make directories |
rm |
Remove files/directories |
mv |
Move/rename files |
cp |
Copy files |
ln |
Create links |
touch |
Update file timestamps |
chmod |
Change file permissions |
chown |
Change file owner |
chgrp |
Change file group |
stat |
Display file status |
find |
Find files |
du |
Disk usage |
df |
Disk free space |
mktemp |
Create temporary file |
realpath |
Print resolved path |
readlink |
Print symlink target |
sync |
Flush filesystem buffers |
file |
Determine file type |
dd |
Convert and copy a file |
mount |
Mount filesystems |
umount |
Unmount filesystems |
chroot |
Change root directory |
pivot_root |
Change root filesystem |
Text Utilities (32 applets)
| Applet |
Description |
grep |
Search for patterns |
awk |
Pattern scanning language |
head |
Output first lines |
tail |
Output last lines |
wc |
Count lines/words/bytes |
sort |
Sort lines of text |
uniq |
Filter duplicate lines |
cut |
Cut fields from lines |
tr |
Translate characters |
sed |
Stream editor |
strings |
Find printable strings |
rev |
Reverse lines |
nl |
Number lines |
fold |
Wrap long lines |
paste |
Merge lines of files |
comm |
Compare sorted files |
diff |
Compare files line by line |
md5sum |
Compute MD5 checksums |
sha256sum |
Compute SHA256 checksums |
cksum |
Compute CRC checksum |
base64 |
Base64 encode/decode |
xxd |
Hex dump |
shuf |
Shuffle lines |
expand / unexpand |
Convert tabs ⟷ spaces |
logger |
Log messages to syslog |
tar |
Archive files |
gzip |
Compress files |
gunzip |
Decompress files |
zcat |
Decompress to stdout |
compress |
Compress files (LZW) |
uncompress |
Decompress .Z files |
Shell Utilities (9 applets)
| Applet |
Description |
seq |
Print sequence of numbers |
expr |
Evaluate expressions |
test / [ |
Evaluate conditions |
printf |
Format and print data |
xargs |
Build commands from stdin |
tty |
Print terminal name |
stty |
Print/change terminal settings |
sh |
Minimal shell |
Process Utilities (11 applets)
| Applet |
Description |
ps |
List running processes |
kill |
Send signal to process |
free |
Display memory usage |
uptime |
Show system uptime |
which |
Find executable in PATH |
top |
Process snapshot |
pidof |
Find PID by name |
pgrep |
Find PID by pattern |
pkill |
Kill processes by name |
nproc |
Number of processors |
watch |
Run command periodically |
System / Privileged (31 applets)
| Applet |
Description |
su |
Switch user |
login |
Begin session |
passwd |
Change password |
adduser |
Add a user |
deluser |
Delete a user |
pwinit |
Init password database |
who |
Show who is logged in |
last |
Show login history |
w |
Show logged in users |
dmesg |
Print kernel messages |
swapon / swapoff |
Enable/disable swap |
modprobe |
Load kernel modules |
insmod |
Insert kernel modules |
rmmod |
Remove kernel modules |
lsmod |
List loaded kernel modules |
udhcpc |
DHCP client |
poweroff |
Power off system |
reboot |
Reboot system |
halt |
Halt system |
shutdown |
Shutdown/reboot system |
mdev |
Create device nodes |
fsck |
Check filesystem |
lsblk |
List block devices |
blkid |
Locate block device attributes |
fdisk |
Manipulate partition table |
mkfs |
Build a filesystem |
mknod |
Create device files |
init |
System init (PID 1) |
Network (8 applets)
| Applet |
Description |
ifconfig |
Network interface info |
curl |
Transfer data from URLs |
ip |
IP configuration |
ping |
Send ICMP echo requests |
wget |
Download files from web |
nc |
Netcat TCP/UDP |
nslookup |
DNS lookup |
httpd |
Minimal HTTP file server |
| Total: 133 applets |
|
Requirements
Required Dependencies
| Package |
Provides |
clang or gcc |
C compiler |
musl or glibc |
C library |
libcrypt |
Password hashing (passwd, su, login) |
libm |
Math library |
libssl-dev / openssl-devel |
HTTPS/TLS support for curl and wget |
Optional Dependencies
| Package |
Purpose |
sudo |
For make install-setuid |
just |
Alternative build system (just build) |
Installation
Compilation
# Standard build (dynamic, ~360K)
make
# Static build (~7.6M, no runtime libs needed)
make static
# Using just
just build # dynamic
just static # static
# Or manually
clang -O2 -Wall -Wextra -std=gnu11 -I. \
main.c applets/*.c \
-o mbox -lssl -lcrypto -lcrypt -lm
Install Applets
# Install symlinks into /usr/local/bin
make install
# Or manually
./mbox --install /usr/local/bin
# Install with setuid root (required for su, login, passwd, mount)
make install-setuid
# List all applets
mbox --list
Manual Symlink Setup
# Create symlinks manually
ln -s mbox /bin/ls
ln -s mbox /bin/cat
ln -s mbox /bin/ps
# ... etc
Usage
Running Applets
# Via mbox directly
mbox ls -la
mbox cat /etc/passwd
mbox ps aux
# Via symlink (preferred)
ls -la
cat /etc/passwd
ps aux
Install to System
# Copy binary
cp mbox /usr/local/bin/mbox
# Install all applets as symlinks
mbox --install /usr/local/bin
# Verify
ls -la /usr/local/bin/ls
# lrwxrwxrwx 1 root root 13 May 15 12:00 /usr/local/bin/ls -> /usr/local/bin/mbox
Relocatable Install
mbox --install creates relative symlinks, so the entire tree can be moved:
# Install into a staging root
mbox --install /tmp/lfs-root/usr/bin
# The symlinks work even if /tmp/lfs-root is later moved to /
cd /tmp/lfs-root && tar czf rootfs.tar.gz .
Built-in Help
Every applet supports --help / -h:
mbox ls --help
mbox dd --help
mbox tar --help
ls --help # via symlink
Shell Completions
Completions for bash, fish, and zsh are in completions/:
# bash
source completions/mbox.bash
# fish
cp completions/mbox.fish ~/.config/fish/completions/mbox.fish
# zsh
cp completions/mbox.zsh /usr/share/zsh/site-functions/_mbox
The completions cover:
- Applet name completion for
mbox <tab>
- Per-applet option completion (e.g.
ls -<tab>, tar -<tab>, dd bs=<tab>)
- Typed argument completion (files, directories, devices, PIDs, hosts)
- Symlink support — works when called as
ls, cat, etc.
Makefile Targets
| Target |
Description |
make / make all |
Standard build |
make static |
Static link with musl |
make install |
Install symlinks to /usr/local/bin |
make install-setuid |
Install binary with setuid root |
make clean |
Remove build artifacts |
Examples
Container / Initramfs
# Build static mbox
make static
# Create minimal rootfs
mkdir -p /tmp/rootfs/{bin,dev,proc,sys,tmp}
cp mbox /tmp/rootfs/bin/
cd /tmp/rootfs/bin && ./mbox --install .
# Boot with: init=/bin/mbox
Embedded System
# Cross-compile for ARM
make CC=arm-linux-musleabi-gcc
# Install to target rootfs
mbox --install /mnt/target-rootfs/bin
Quick File Server
# Serve current directory on port 8080
httpd -p 8080
# Or via mbox
mbox httpd -p 8080
Comparison
| Feature |
mbox |
busybox |
toybox |
| Binary size |
~1.6 MB static |
~1 MB |
~400 KB |
| Applets |
132 |
300+ |
200+ |
| Built-in help |
All applets |
Most applets |
Most applets |
| Shell completions |
bash/fish/zsh |
None |
None |
| License |
MIT |
GPLv2 |
BSD |
| Build deps |
libc + libcrypt |
libc + config |
libc only |
| Install method |
--install |
make install |
make install |
| Symlink type |
Relative |
Absolute |
Absolute |
License
MIT License — See LICENSE file for details.
Contributing
- Fork the repository: http://git.porkof48.ru/faron/mbox
- Create a feature branch
- Add your applet to
applets/ and register in applets.h
- Submit a pull request
Support
For issues and questions, please open an issue on gitea: http://git.porkof48.ru/faron/mbox/issues
mbox — One binary, a hundred tools.
© 2026