BusyBox

This article introduces the BusyBox.

Overview

What is busybox

  BusyBox combines tiny versions of many common UNIX utilities into a single
  small executable.  It provides minimalist replacements for most of the
  utilities you usually find in bzip2, coreutils, dhcp, diffutils, e2fsprogs,
  file, findutils, gawk, grep, inetutils, less, modutils, net-tools, procps,
  sed, shadow, sysklogd, sysvinit, tar, util-linux, and vim.  The utilities
  in BusyBox often have fewer options than their full-featured cousins;
  however, the options that are included provide the expected functionality
  and behave very much like their larger counterparts.

  BusyBox has been written with size-optimization and limited resources in
  mind, both to produce small binaries and to reduce run-time memory usage.
  Busybox is also extremely modular so you can easily include or exclude
  commands (or features) at compile time.  This makes it easy to customize
  embedded systems; to create a working system, just add /dev, /etc, and a
  Linux kernel.  Busybox (usually together with uClibc) has also been used as
  a component of "thin client" desktop systems, live-CD distributions, rescue
  disks, installers, and so on.

  BusyBox provides a fairly complete POSIX environment for any small system,
  both embedded environments and more full featured systems concerned about
  space.  Busybox is slowly working towards implementing the full Single Unix
  Specification V3 (http://www.opengroup.org/onlinepubs/009695399/), but isn't
  there yet (and for size reasons will probably support at most UTF-8 for
  internationalization).  We are also interested in passing the Linux Test
  Project (http://ltp.sourceforge.net).


Using busybox:

  BusyBox is extremely configurable.  This allows you to include only the
  components and options you need, thereby reducing binary size.  Run 'make
  config' or 'make menuconfig' to select the functionality that you wish to
  enable.  (See 'make help' for more commands.)

  The behavior of busybox is determined by the name it's called under: as
  "cp" it behaves like cp, as "sed" it behaves like sed, and so on.  Called
  as "busybox" it takes the second argument as the name of the applet to
  run (I.E. "./busybox ls -l /proc").

  The "standalone shell" mode is an easy way to try out busybox; this is a
  command shell that calls the built-in applets without needing them to be
  installed in the path.  (Note that this requires /proc to be mounted, if
  testing from a boot floppy or in a chroot environment.)

  The build automatically generates a file "busybox.links", which is used by
  'make install' to create symlinks to the BusyBox binary for all compiled in
  commands.  This uses the CONFIG_PREFIX environment variable to specify
  where to install, and installs hardlinks or symlinks depending
  on the configuration preferences.  (You can also manually run
  the install script at "applets/install.sh").
  • Output of command
$ busybox
BusyBox v1.18.0 (2010-12-01 19:10:28 CET) multi-call binary.
Copyright (C) 1998-2009 Erik Andersen, Rob Landley, Denys Vlasenko
and others. Licensed under GPLv2.
See source distribution for full notice.

Usage: busybox [function] [arguments]...
   or: busybox --list[-full]
   or: function [arguments]...

	BusyBox is a multi-call binary that combines many common Unix
	utilities into a single executable.  Most people will create a
	link to busybox for each function they wish to use and BusyBox
	will act like whatever it was invoked as.

Currently defined functions:
	[, [[, acpid, add-shell, addgroup, adduser, adjtimex, ar, arp, arping,
	awk, base64, basename, bbconfig, beep, blkid, blockdev, bootchartd,
	brctl, bunzip2, bzcat, bzip2, cal, cat, catv, chat, chattr, chgrp,
	chmod, chown, chpasswd, chpst, chroot, chrt, chvt, cksum, clear, cmp,
	comm, conspy, cp, cpio, crond, crontab, cryptpw, cttyhack, cut, date,
	dc, dd, deallocvt, delgroup, deluser, depmod, devfsd, devmem, df,
	dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname, dos2unix, dpkg,
	dpkg-deb, du, dumpkmap, dumpleases, echo, ed, egrep, eject, env,
	envdir, envuidgid, ether-wake, expand, expr, fakeidentd, false, fbset,
	fbsplash, fdflush, fdformat, fdisk, fgconsole, fgrep, find, findfs,
	flash_eraseall, flash_lock, flash_unlock, flashcp, flock, fold, free,
	freeramdisk, fsck, fsck.minix, fsync, ftpd, ftpget, ftpput, fuser,
	getopt, getty, grep, gunzip, gzip, halt, hd, hdparm, head, hexdump,
	hostid, hostname, httpd, hush, hwclock, id, ifconfig, ifdown,
	ifenslave, ifplugd, ifup, inetd, init, inotifyd, insmod, install,
	ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, iproute,
	iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last,
	length, less, linux32, linux64, linuxrc, ln, loadfont, loadkmap,
	logger, login, logname, logread, losetup, lpd, lpq, lpr, ls, lsattr,
	lsmod, lspci, lsusb, lzcat, lzma, lzop, lzopcat, makedevs, makemime,
	man, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mke2fs, mkfifo,
	mkfs.ext2, mkfs.minix, mkfs.reiser, mkfs.vfat, mknod, mkpasswd, mkswap,
	mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, msh, mt,
	mv, nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice, nmeter,
	nohup, nslookup, ntpd, od, openvt, passwd, patch, pgrep, pidof, ping,
	ping6, pipe_progress, pivot_root, pkill, pmap, popmaildir, poweroff,
	powertop, printenv, printf, ps, pscan, pwd, raidautorun, rdate, rdev,
	readahead, readlink, readprofile, realpath, reboot, reformime,
	remove-shell, renice, reset, resize, rev, rfkill, rm, rmdir, rmmod,
	route, rpm, rpm2cpio, rtcwake, run-parts, runlevel, runsv, runsvdir,
	rx, script, scriptreplay, sed, sendmail, seq, setarch, setconsole,
	setfont, setkeycodes, setlogcons, setsid, setuidgid, sh, sha1sum,
	sha256sum, sha512sum, showkey, slattach, sleep, smemcap, softlimit,
	sort, split, start-stop-daemon, stat, strings, stty, su, sulogin, sum,
	sv, svlogd, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac,
	tail, tar, taskset, tcpsvd, tee, telnet, telnetd, test, tftp, tftpd,
	time, timeout, top, touch, tr, traceroute, traceroute6, true, tty,
	ttysize, tunctl, tune2fs, ubiattach, ubidetach, udhcpc, udhcpd, udpsvd,
	umount, uname, uncompress, unexpand, uniq, unix2dos, unlzma, unlzop,
	unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock,
	volname, wall, watch, watchdog, wc, wget, which, who, whoami, xargs,
	xz, xzcat, yes, zcat, zcip

References