busybox
Provide minimal tools for embedded systems
TLDR
Execute a BusyBox function
Display help and a list of functions
SYNOPSIS
busybox [OPTIONS] COMMAND [ARGUMENTS...]
or
COMMAND [ARGUMENTS...] (when symlinked)
PARAMETERS
--list
Displays a list of all applets that are compiled into the current busybox binary. This shows what functionality is available.
--install [-s] PATH
Installs symlinks (or hardlinks, depending on configuration) for all compiled-in applets into the specified PATH. This allows you to invoke applets directly by their common names (e.g., ls instead of busybox ls). The -s option creates relative symlinks.
--uninstall [-s] PATH
Removes the symlinks (or hardlinks) previously created by the --install command from the specified PATH.
--help
Provides general usage information for the busybox command itself, including a list of global options and available applets. To get help for a specific applet, use busybox APPLET --help or APPLET --help if symlinked.
DESCRIPTION
BusyBox is a remarkable software utility that consolidates a large number of common Unix utilities into a single, compact executable. It is often referred to as the "Swiss Army Knife" of embedded Linux due to its versatility and minimal resource footprint. Designed specifically for embedded systems, small Linux distributions, rescue disks, and bootloaders, BusyBox significantly reduces disk space and system memory requirements compared to installing individual GNU coreutils. It achieves this by functioning as a single binary that, upon execution, determines which internal utility (known as an "applet") to run based on how it was invoked (e.g., via a symlink named ls or grep). This design makes it an indispensable component for environments where every kilobyte counts, providing essential command-line functionality without the overhead of larger, more feature-rich counterparts.
CAVEATS
While highly efficient, BusyBox applets often implement only a subset of the features and options found in their corresponding full-fledged GNU utilities. This means that some less common command-line flags or specific behaviors might be absent or differ, which can lead to unexpected results when porting scripts or expecting full POSIX compliance. Due to its minimalist design, error messages can sometimes be less detailed, and certain advanced functionalities requiring external libraries are typically not included.
APPLETS
The fundamental design of BusyBox revolves around the concept of "applets." Instead of being separate executable files, utilities like ls, cp, mkdir, and even its shell (ash) are compiled as small functions within the single busybox binary. When the busybox executable is launched, it inspects the name used to invoke it (typically determined from argv[0], the first command-line argument) to decide which internal applet function to execute. This monolithic structure significantly reduces disk space consumption by eliminating redundant executable headers and shared library dependencies.
COMPILE-TIME CONFIGURATION
A key feature of BusyBox is its highly customizable nature, primarily achieved through compile-time configuration. Developers can use a configuration system similar to the Linux kernel's (make menuconfig) to select precisely which applets and their specific features to include in the final binary. This allows for tailor-made builds that contain only the necessary functionalities, further optimizing binary size and resource usage for specific embedded systems or minimal environments. This flexibility is crucial for adapting BusyBox to a vast array of hardware and software requirements.
HISTORY
BusyBox was conceived and initially developed by Bruce Perens in 1996 with the ambitious goal of creating a complete, bootable Linux system on a single floppy disk. Its primary purpose was to provide a minimal yet functional set of UNIX tools for small, embedded environments. Over the years, its development continued under various maintainers, including Erik Andersen, and is currently led by Denys Vlasenko. It has evolved into a cornerstone for embedded Linux, widely used in devices like network routers, set-top boxes, and Android systems, as well as in minimalist container images and rescue disks, due to its unparalleled small size and versatility.