# vi: set sw=4 ts=4:

=head1 NAME

BusyBox - The Swiss Army Knife of Embedded Linux

=head1 SYNTAX

 busybox <applet> [arguments...]  # or

 <applet> [arguments...]	  # if symlinked

=head1 DESCRIPTION

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 GNU coreutils, util-linux, etc. The utilities in BusyBox
generally have fewer options than their full-featured GNU cousins; however, the
options that are included provide the expected functionality and behave very
much like their GNU counterparts.

BusyBox has been written with size-optimization and limited resources in mind.
It is also extremely modular so you can easily include or exclude commands (or
features) at compile time. This makes it easy to customize your embedded
systems. To create a working system, just add /dev, /etc, and a Linux kernel.
BusyBox provides a fairly complete POSIX environment for any small or embedded
system.

BusyBox is extremely configurable.  This allows you to include only the
components you need, thereby reducing binary size. Run 'make config' or 'make
menuconfig' to select the functionality that you wish to enable.  Then run
'make' to compile BusyBox using your configuration.

After the compile has finished, you should use 'make install' to install
BusyBox. This will install the 'bin/busybox' binary, in the target directory
specified by CONFIG_PREFIX. CONFIG_PREFIX can be set when configuring BusyBox,
or you can specify an alternative location at install time (i.e., with a
command line like 'make CONFIG_PREFIX=/tmp/foo install'). If you enabled
any applet installation scheme (either as symlinks or hardlinks), these will
also be installed in the location pointed to by CONFIG_PREFIX.

=head1 USAGE

BusyBox is a multi-call binary.  A multi-call binary is an executable program
that performs the same job as more than one utility program.  That means there
is just a single BusyBox binary, but that single binary acts like a large
number of utilities.  This allows BusyBox to be smaller since all the built-in
utility programs (we call them applets) can share code for many common
operations.

You can also invoke BusyBox by issuing a command as an argument on the
command line.  For example, entering

	/bin/busybox ls

will also cause BusyBox to behave as 'ls'.

Of course, adding '/bin/busybox' into every command would be painful.  So most
people will invoke BusyBox using links to the BusyBox binary.

For example, entering

	ln -s /bin/busybox ls
	./ls

will cause BusyBox to behave as 'ls' (if the 'ls' command has been compiled
into BusyBox).  Generally speaking, you should never need to make all these
links yourself, as the BusyBox build system will do this for you when you run
the 'make install' command.

If you invoke BusyBox with no arguments, it will provide you with a list of the
applets that have been compiled into your BusyBox binary.

=head1 COMMON OPTIONS

Most BusyBox applets support the B<--help> argument to provide a terse runtime
description of their behavior.  If the CONFIG_FEATURE_VERBOSE_USAGE option has
been enabled, more detailed usage information will also be available.

=head1 COMMANDS

Currently available applets include:

	ash, awk, basename, blkid, brctl, cat, chmod, chown, chroot, cmp,
	cp, date, dd, df, dhcprelay, dirname, dmesg, du, echo, egrep, env,
	expr, fdisk, fgrep, find, free, grep, halt, hd, hexdump, hostid,
	hostname, hwclock, id, ifconfig, init, insmod, install, kill,
	killall, klogd, less, link, linuxrc, ln, logger, login, logname, ls,
	lsmod, lsof, lsusb, mdev, mesg, mkdir, mkdosfs, mkfs.vfat, mknod,
	modprobe, more, mount, mountpoint, mv, pidof, ping, pivot_root,
	poweroff, printenv, printf, ps, pstree, pwd, reboot, rm, rmdir,
	rmmod, route, sh, sleep, sort, start-stop-daemon, sync, sysctl,
	syslogd, telnet, telnetd, tftp, top, touch, udhcpc, udhcpd, uevent,
	umount, uptime, vi, watch, wget, xargs

=head1 COMMAND DESCRIPTIONS

=over 4

=item B<ash>

ash [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]

=item B<awk>

awk [OPTIONS] [AWK_PROGRAM] [FILE]...

=item B<basename>

basename FILE [SUFFIX]

=item B<blkid>

blkid [BLOCKDEV]...

=item B<brctl>

brctl COMMAND [BRIDGE [INTERFACE]]

=item B<cat>

cat [-nbvteA] [FILE]...

=item B<chmod>

chmod [-R] MODE[,MODE]... FILE...

=item B<chown>

chown [-Rh]... USER[:[GRP]] FILE...

=item B<chroot>

chroot NEWROOT [PROG ARGS]

=item B<cmp>

cmp [-l] [-s] FILE1 [FILE2]

=item B<cp>

cp [OPTIONS] SOURCE... DEST

=item B<date>

date [OPTIONS] [+FMT] [TIME]

=item B<dd>

dd [if=FILE] [of=FILE] [ibs=N] [obs=N] [bs=N] [count=N] [skip=N]
	[seek=N] [conv=notrunc|noerror|sync|fsync] [iflag=skip_bytes]

=item B<df>

df [-PkmhT] [FILESYSTEM]...

=item B<dhcprelay>

dhcprelay CLIENT_IFACE[,CLIENT_IFACE2]... SERVER_IFACE [SERVER_IP]

=item B<dirname>

dirname FILENAME

=item B<dmesg>

dmesg [-c] [-n LEVEL] [-s SIZE]

=item B<du>

du [-aHLdclsxhmk] [FILE]...

=item B<echo>

echo [-neE] [ARG]...

=item B<env>

env [-iu] [-] [name=value]... [PROG ARGS]

=item B<expr>

expr EXPRESSION

=item B<fdisk>

fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK

=item B<find>

find [-HL] [PATH]... [OPTIONS] [ACTIONS]

=item B<free>

free

=item B<grep>

grep [-HhnlLoqvsriwFE] [-m N] [-A/B/C N] PATTERN/-e PATTERN.../-f FILE [FILE]...

=item B<halt>

halt [-d DELAY] [-n] [-f]

=item B<hd>

hd FILE...

=item B<hexdump>

hexdump [-bcCdefnosvx] [FILE]...

=item B<hostid>

hostid

=item B<hostname>

hostname [OPTIONS] [HOSTNAME | -F FILE]

=item B<hwclock>

hwclock [-r|--show] [-s|--hctosys] [-w|--systohc] [-t|--systz] [-l|--localtime] [-u|--utc] [-f|--rtc FILE]

=item B<id>

id [OPTIONS] [USER]

=item B<ifconfig>

ifconfig [-a] interface [address]

=item B<init>

init

=item B<insmod>

insmod FILE [SYMBOL=VALUE]...

=item B<install>

install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [-t DIR] [SOURCE]... DEST

=item B<kill>

kill [-l] [-SIG] PID...

=item B<killall>

killall [-l] [-q] [-SIG] PROCESS_NAME...

=item B<klogd>

klogd [-c N] [-n]

=item B<less>

less [-EIMmNSh~] [FILE]...

=item B<link>

link FILE LINK

=item B<ln>

ln [OPTIONS] TARGET... LINK|DIR

=item B<logger>

logger [OPTIONS] [MESSAGE]

=item B<login>

login [-p] [-h HOST] [[-f] USER]

=item B<logname>

logname

=item B<ls>

ls [-1AaCxdLHRFplinshrSXvctu] [-w WIDTH] [FILE]...

=item B<lsmod>

lsmod

=item B<lsof>

lsof

=item B<mdev>

mdev [-s]

=item B<mesg>

mesg [y|n]

=item B<mkdir>

mkdir [OPTIONS] DIRECTORY...

=item B<mkdosfs>

mkdosfs [-v] [-n LABEL] BLOCKDEV [KBYTES]

=item B<mkfs.vfat>

mkfs.vfat [-v] [-n LABEL] BLOCKDEV [KBYTES]

=item B<mknod>

mknod [-m MODE] NAME TYPE MAJOR MINOR

=item B<modprobe>

modprobe [-alrqvsD] MODULE [SYMBOL=VALUE]...

=item B<more>

more [FILE]...

=item B<mount>

mount [OPTIONS] [-o OPT] DEVICE NODE

=item B<mountpoint>

mountpoint [-q] <[-dn] DIR | -x DEVICE>

=item B<mv>

mv [-fin] SOURCE DEST
or: mv [-fin] SOURCE... DIRECTORY

=item B<pidof>

pidof [OPTIONS] [NAME]...

=item B<ping>

ping [OPTIONS] HOST

=item B<pivot_root>

pivot_root NEW_ROOT PUT_OLD

=item B<poweroff>

poweroff [-d DELAY] [-n] [-f]

=item B<printenv>

printenv [VARIABLE]...

=item B<printf>

printf FORMAT [ARG]...

=item B<ps>

ps

=item B<pstree>

pstree [-p] [PID|USER]

=item B<pwd>

pwd

=item B<reboot>

reboot [-d DELAY] [-n] [-f]

=item B<rm>

rm [-irf] FILE...

=item B<rmdir>

rmdir [OPTIONS] DIRECTORY...

=item B<rmmod>

rmmod [-wfa] [MODULE]...

=item B<route>

route [{add|del|delete}]

=item B<sh>

sh [-/+OPTIONS] [-/+o OPT]... [-c 'SCRIPT' [ARG0 [ARGS]] / FILE [ARGS]]

=item B<sleep>

sleep [N]...

=item B<sort>

sort [-nrugMcszbdfiokt] [-o FILE] [-k start[.offset][opts][,end[.offset][opts]] [-t CHAR] [FILE]...

=item B<start-stop-daemon>

start-stop-daemon [OPTIONS] [-S|-K] ... [-- ARGS...]

=item B<sync>

sync

=item B<sysctl>

sysctl [OPTIONS] [KEY[=VALUE]]...

=item B<syslogd>

syslogd [OPTIONS]

=item B<telnet>

telnet [-a] [-l USER] HOST [PORT]

=item B<telnetd>

telnetd [OPTIONS]

=item B<tftp>

tftp [OPTIONS] HOST [PORT]

=item B<top>

top [-b] [-nCOUNT] [-dSECONDS] [-m]

=item B<touch>

touch [-c] FILE...

=item B<udhcpc>

udhcpc [-fbqRB] [-a[MSEC]] [-t N] [-T SEC] [-A SEC/-n]
	[-i IFACE] [-s PROG] [-p PIDFILE]
	[-oC] [-r IP] [-V VENDOR] [-F NAME] [-x OPT:VAL]... [-O OPT]...

=item B<udhcpd>

udhcpd [-fS] [-I ADDR] [CONFFILE]

=item B<uevent>

uevent [PROG [ARGS]]

=item B<umount>

umount [OPTIONS] FILESYSTEM|DIRECTORY

=item B<uptime>

uptime

=item B<vi>

vi [OPTIONS] [FILE]...

=item B<watch>

watch [-n SEC] [-t] PROG ARGS

=item B<wget>

wget [-c|--continue] [--spider] [-q|--quiet] [-O|--output-document FILE]
	[--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
	[-S|--server-response] [-U|--user-agent AGENT] [-T SEC] URL...

=item B<xargs>

xargs [OPTIONS] [PROG ARGS]

=back

=head1 LIBC NSS

GNU Libc (glibc) uses the Name Service Switch (NSS) to configure the behavior
of the C library for the local environment, and to configure how it reads
system data, such as passwords and group information.  This is implemented
using an /etc/nsswitch.conf configuration file, and using one or more of the
/lib/libnss_* libraries.  BusyBox tries to avoid using any libc calls that make
use of NSS.  Some applets however, such as login and su, will use libc functions
that require NSS.

If you enable CONFIG_USE_BB_PWD_GRP, BusyBox will use internal functions to
directly access the /etc/passwd, /etc/group, and /etc/shadow files without
using NSS.  This may allow you to run your system without the need for
installing any of the NSS configuration files and libraries.

When used with glibc, the BusyBox 'networking' applets will similarly require
that you install at least some of the glibc NSS stuff (in particular,
/etc/nsswitch.conf, /lib/libnss_dns*, /lib/libnss_files*, and /lib/libresolv*).

Shameless Plug: As an alternative, one could use a C library such as uClibc.  In
addition to making your system significantly smaller, uClibc does not require the
use of any NSS support files or libraries.

=head1 MAINTAINER

Denis Vlasenko <vda.linux@googlemail.com>

=head1 AUTHORS

The following people have contributed code to BusyBox whether they know it or
not.  If you have written code included in BusyBox, you should probably be
listed here so you can obtain your bit of eternal glory.  If you should be
listed here, or the description of what you have done needs more detail, or is
incorrect, please send in an update.


=for html <br>

Emanuele Aina <emanuele.aina@tiscali.it>
    run-parts

=for html <br>

Erik Andersen <andersen@codepoet.org>

    Tons of new stuff, major rewrite of most of the
    core apps, tons of new apps as noted in header files.
    Lots of tedious effort writing these boring docs that
    nobody is going to actually read.

=for html <br>

Laurence Anderson <l.d.anderson@warwick.ac.uk>

    rpm2cpio, unzip, get_header_cpio, read_gz interface, rpm

=for html <br>

Jeff Angielski <jeff@theptrgroup.com>

    ftpput, ftpget

=for html <br>

Edward Betts <edward@debian.org>

    expr, hostid, logname, whoami

=for html <br>

John Beppu <beppu@codepoet.org>

    du, nslookup, sort

=for html <br>

Brian Candler <B.Candler@pobox.com>

    tiny-ls(ls)

=for html <br>

Randolph Chung <tausq@debian.org>

    fbset, ping, hostname

=for html <br>

Dave Cinege <dcinege@psychosis.com>

    more(v2), makedevs, dutmp, modularization, auto links file,
    various fixes, Linux Router Project maintenance

=for html <br>

Jordan Crouse <jordan@cosmicpenguin.net>

    ipcalc

=for html <br>

Magnus Damm <damm@opensource.se>

    tftp client insmod powerpc support

=for html <br>

Larry Doolittle <ldoolitt@recycle.lbl.gov>

    pristine source directory compilation, lots of patches and fixes.

=for html <br>

Glenn Engel <glenne@engel.org>

    httpd

=for html <br>

Gennady Feldman <gfeldman@gena01.com>

    Sysklogd (single threaded syslogd, IPC Circular buffer support,
    logread), various fixes.

=for html <br>

Karl M. Hegbloom <karlheg@debian.org>

    cp_mv.c, the test suite, various fixes to utility.c, &c.

=for html <br>

Daniel Jacobowitz <dan@debian.org>

    mktemp.c

=for html <br>

Matt Kraai <kraai@alumni.cmu.edu>

    documentation, bugfixes, test suite

=for html <br>

Stephan Linz <linz@li-pro.net>

    ipcalc, Red Hat equivalence

=for html <br>

John Lombardo <john@deltanet.com>

    tr

=for html <br>

Glenn McGrath <bug1@iinet.net.au>

    Common unarchiving code and unarchiving applets, ifupdown, ftpgetput,
    nameif, sed, patch, fold, install, uudecode.
    Various bugfixes, review and apply numerous patches.

=for html <br>

Manuel Novoa III <mjn3@codepoet.org>

    cat, head, mkfifo, mknod, rmdir, sleep, tee, tty, uniq, usleep, wc, yes,
    mesg, vconfig, make_directory, parse_mode, dirname, mode_string,
    get_last_path_component, simplify_path, and a number trivial libbb routines

    also bug fixes, partial rewrites, and size optimizations in
    ash, basename, cal, cmp, cp, df, du, echo, env, ln, logname, md5sum, mkdir,
    mv, realpath, rm, sort, tail, touch, uname, watch, arith, human_readable,
    interface, dutmp, ifconfig, route

=for html <br>

Vladimir Oleynik <dzo@simtreas.ru>

    cmdedit; xargs(current), httpd(current);
    ports: ash, crond, fdisk, inetd, stty, traceroute, top;
    locale, various fixes
    and irreconcilable critic of everything not perfect.

=for html <br>

Bruce Perens <bruce@pixar.com>

    Original author of BusyBox in 1995, 1996. Some of his code can
    still be found hiding here and there...

=for html <br>

Tim Riker <Tim@Rikers.org>

    bug fixes, member of fan club

=for html <br>

Kent Robotti <robotti@metconnect.com>

    reset, tons and tons of bug reports and patches.

=for html <br>

Chip Rosenthal <chip@unicom.com>, <crosenth@covad.com>

    wget - Contributed by permission of Covad Communications

=for html <br>

Pavel Roskin <proski@gnu.org>

    Lots of bugs fixes and patches.

=for html <br>

Gyepi Sam <gyepi@praxis-sw.com>

    Remote logging feature for syslogd

=for html <br>

Linus Torvalds <torvalds@transmeta.com>

    mkswap, fsck.minix, mkfs.minix

=for html <br>

Mark Whitley <markw@codepoet.org>

    grep, sed, cut, xargs(previous),
    style-guide, new-applet-HOWTO, bug fixes, etc.

=for html <br>

Charles P. Wright <cpwright@villagenet.com>

    gzip, mini-netcat(nc)

=for html <br>

Enrique Zanardi <ezanardi@ull.es>

    tarcat (since removed), loadkmap, various fixes, Debian maintenance

=for html <br>

Tito Ragusa <farmatito@tiscali.it>

    devfsd and size optimizations in strings, openvt and deallocvt.

=for html <br>

Paul Fox <pgf@foxharp.boston.ma.us>

    vi editing mode for ash, various other patches/fixes

=for html <br>

Roberto A. Foglietta <me@roberto.foglietta.name>

    port: dnsd

=for html <br>

Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>

    misc

=for html <br>

Mike Frysinger <vapier@gentoo.org>

    initial e2fsprogs, printenv, setarch, sum, misc

=for html <br>

Jie Zhang <jie.zhang@analog.com>

    fixed two bugs in msh and hush (exitcode of killed processes)

=cut
