What is BusyBox?
2026-05-12

I've often stumbled upon BusyBox, but only after noticing Alpine, by default, has wget installed did I start to investigate where it comes from. Except the wget version was "BusyBox Wget".
But what's that?
After running ls -la /usr/bin, my mind was blown: nearly 130+ executables are from a single binary!
That explains the name "multicall binary". But... how? How does BusyBox work?
How does a single binary know which executable to run? Well, I guessed it right:
applet_name = argv;
if
applet_name++;
applet_name = ;
So, an explicit invocation would also work:
So, to run wget, we find it by name and run it:
int applet = ;
// ...
;
// ...
xfunc_error_retval = applet_main;
Each applet has its own C file, wget being wget.c. Each applet also appears to have some sort of "config" defined in code comments:
//config:config WGET
//config: bool "wget (41 kb)"
//config: default y
//config: help
//config: wget is a utility for non-interactive download of files from HTTP
//config: and FTP servers.
//applet:IF_WGET(APPLET(wget, BB_DIR_USR_BIN, BB_SUID_DROP))
//kbuild:lib-$(CONFIG_WGET) += wget.o
And eventually, we invoke the wget main:
int
Other interesting bits: BusyBox also supports hard links.
-s creates symlinks.
You can also list what commands it has compiled in:
So, Alpine is more like an interface to BusyBox-based binaries. Each binary seems to be a bit stripped-down version of the actual full-blown one. I'd still be interested to know if these are reimplementations or just the original source code of the utility shrunk down.