# BusyBox
BusyBox is a software suite providing hundreds of [[Unix]] utilities in a single executable, designed for embedded systems and environments with limited resources. Created by [[Bruce Perens]] in 1996 for the Debian installer, it's often called "The Swiss Army Knife of Embedded Linux." A typical BusyBox binary is under 1MB yet includes shell, file utilities, networking tools, and more.
BusyBox combines stripped-down versions of common Unix tools (ls, cp, grep, awk, etc.) into one binary that uses symbolic links—calling `ls` actually runs `busybox ls`. This shared-code approach dramatically reduces size compared to full GNU utilities. BusyBox powers most embedded Linux devices, Docker's Alpine images, Android's recovery mode, and countless routers and IoT devices.
## Key Features
- **Single binary**: Hundreds of utilities in ~1MB
- **Modular**: Configure which applets to include at compile time
- **Resource efficient**: Minimal memory and storage footprint
- **POSIX-like**: Compatible with most shell scripts
- **GPL licensed**: [[GPLv2 License]]
## Included Applets (Selection)
| Category | Utilities |
|----------|-----------|
| Shell | ash, sh, hush |
| File | ls, cp, mv, rm, cat, find, grep |
| Text | awk, sed, sort, cut, head, tail |
| Archive | tar, gzip, bzip2, unzip |
| Network | wget, telnet, nc, ping, ifconfig |
| Process | ps, kill, top, free |
| System | mount, umount, dmesg, init |
## Common Uses
- **Embedded Linux**: Routers, IoT devices, appliances
- **Docker containers**: Alpine Linux base images
- **Initramfs/initrd**: Early boot environment
- **Recovery systems**: Android recovery, rescue disks
- **Minimal systems**: Resource-constrained environments
## BusyBox vs GNU Coreutils
| Aspect | BusyBox | GNU Coreutils |
|--------|---------|---------------|
| Size | ~1MB total | ~15MB+ |
| Features | Essential subset | Full featured |
| Target | Embedded/minimal | Desktop/server |
| Options | Limited flags | Extensive flags |
## Installation
```bash
# Many distros
apt install busybox
# Or compile from source with custom config
make menuconfig
make
make install
```
## How It Works
BusyBox uses a single executable with multiple "applets":
```bash
# All point to the same binary
/bin/ls -> /bin/busybox
/bin/cp -> /bin/busybox
/bin/grep -> /bin/busybox
# BusyBox checks argv[0] to determine which applet to run
```
## References
- https://busybox.net
- https://en.wikipedia.org/wiki/BusyBox
- https://git.busybox.net/busybox
## Related
- [[Bruce Perens]]
- [[Linux]]
- [[Unix]]
- [[Debian]]
- [[Alpine Linux]]
- [[GPLv2 License]]
- [[GNU is not Unix (GNU)]]