Busybox Command Help
Busybox Command Help
NAME
BusyBox - The Swiss Army Knife of Embedded Linux
SYNTAX
busybox <applet> [arguments...] # or
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.
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
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 2/70(W)
Of course, adding '/bin/busybox' into every command would be painful. So most people will
invoke BusyBox using links to the BusyBox binary.
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.
COMMON OPTIONS
Most BusyBox applets support the --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.
COMMANDS
Currently available applets include:
[, [[, acpid, addgroup, adduser, adjtimex, ar, arp, arping, ash,
awk, basename, beep, blkid, brctl, bunzip2, bzcat, bzip2, cal, cat,
catv, chat, chattr, chgrp, chmod, chown, chpasswd, chpst, chroot,
chrt, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab,
cryptpw, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod,
devmem, df, dhcprelay, diff, dirname, dmesg, dnsd, dnsdomainname,
dos2unix, dpkg, du, dumpkmap, dumpleases, echo, ed, egrep, eject,
env, envdir, envuidgid, expand, expr, fakeidentd, false, fbset,
fbsplash, fdflush, fdformat, fdisk, fgrep, find, findfs, flash_lock,
flash_unlock, fold, free, freeramdisk, fsck, fsck.minix, fsync,
ftpd, ftpget, ftpput, fuser, getopt, getty, grep, gunzip, gzip, hd,
hdparm, head, hexdump, hostid, hostname, httpd, hush, hwclock, id,
ifconfig, ifdown, ifenslave, ifplugd, ifup, inetd, init, inotifyd,
insmod, install, ionice, 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, lzmacat, lzop, lzopcat, makemime, man, md5sum,
mdev, mesg, microcom, mkdir, mkdosfs, mkfifo, mkfs.minix, mkfs.vfat,
mknod, mkpasswd, mkswap, mktemp, modprobe, more, mount, mountpoint,
mt, mv, nameif, nc, netstat, nice, nmeter, nohup, nslookup, od,
openvt, passwd, patch, pgrep, pidof, ping, ping6, pipe_progress,
pivot_root, pkill, popmaildir, printenv, printf, ps, pscan, pwd,
raidautorun, rdate, rdev, readlink, readprofile, realpath,
reformime, renice, reset, resize, 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,
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 3/70(W)
COMMAND DESCRIPTIONS
acpid
Options:
-d Do not daemonize and log to stderr
-c DIR Config directory [/etc/acpi]
-e FILE /proc event file [/proc/acpi/event]
-l FILE Log file [/var/log/acpid]
addgroup
Options:
-g GID Group id
-S Create a system group
adduser
Add a user
Options:
-h DIR Home directory
-g GECOS GECOS field
-s SHELL Login shell
-G GRP Add user to existing group
-S Create a system user
-D Do not assign a password
-H Do not create home directory
-u UID User id
adjtimex
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 4/70(W)
adjtimex [-q] [-o offset] [-f frequency] [-p timeconstant] [-t tick]
Options:
-q Quiet
-o offset Time offset, microseconds
-f frequency Frequency adjust, integer kernel units (65536 is 1ppm)
(positive values make clock run faster)
-t tick Microseconds per tick, usually 10000
-p timeconstant
ar
Options:
-o Preserve original dates
-p Extract to stdout
-t List
-x Extract
-v Verbose
arp
arp
[-vn][-H type] [-i if] -a [hostname]
[-v] [-i if] -d hostname [pub]
[-v] [-H type] [-i if] -s hostname hw_addr [temp]
[-v] [-H type] [-i if] -s hostname hw_addr [netmask nm] pub
[-v] [-H type] [-i if] -Ds hostname ifa [netmask nm] pub
Options:
-a Display (all) hosts
-s Set new ARP entry
-d Delete a specified entry
-v Verbose
-n Don't resolve names
-i IF Network interface
-D Read <hwaddr> from given device
-A, -p AF Protocol family
-H HWTYPE Hardware address type
arping
arping [-fqbDUA] [-c count] [-w timeout] [-I dev] [-s sender] target
Options:
-f Quit on first ARP reply
-q Quiet
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 5/70(W)
awk
Options:
-v VAR=VAL Set variable
-F SEP Use SEP as field separator
-f FILE Read program from file
basename
beep
Options:
-f Frequency in Hz
-l Length in ms
-d Delay in ms
-r Repetitions
-n Start new tone
blkid
blkid
brctl
Commands:
show Show a list of bridges
addbr BRIDGE Create BRIDGE
delbr BRIDGE Delete BRIDGE
addif BRIDGE IFACE Add IFACE to BRIDGE
delif BRIDGE IFACE Delete IFACE from BRIDGE
setageing BRIDGE TIME Set ageing time
setfd BRIDGE TIME Set bridge forward delay
sethello BRIDGE TIME Set hello time
setmaxage BRIDGE TIME Set max message age
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 6/70(W)
bunzip2
Options:
-c Write to standard output
-f Force
bzcat
bzcat FILE
Uncompress to stdout
bzip2
Compress FILE(s) with bzip2 algorithm. When FILE is '-' or unspecified, reads standard
input. Implies -c.
Options:
-c Write to standard output
-d Decompress
-f Force
-1..-9 Compression level
cal
Display a calendar
Options:
-j Use julian dates
-y Display the entire year
cat
Options:
-u Use unbuffered i/o (ignored)
catv
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 7/70(W)
Options:
-e End each line with $
-t Show tabs as ^I
-v Don't use ^x or M-x escapes
chat
Useful for interacting with a modem connected to stdin/stdout. A script consists of one or
more "expect-send" pairs of strings, each pair is a pair of arguments. Example: chat '' ATZ
OK ATD123456 CONNECT '' ogin: pppuser word: ppppass '~'
chattr
Modifiers:
- Remove attributes
+ Add attributes
= Set attributes
Attributes:
chgrp
Options:
-R Recurse
-h Affect symlinks instead of symlink targets
-L Traverse all symlinks to directories
-H Traverse symlinks on command line only
-P Do not traverse symlinks (default)
-c List changed files
-v Verbose
-f Hide errors
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 8/70(W)
chmod
Each MODE is one or more of the letters ugoa, one of the symbols +-= and one or more of
the letters rwxst
Options:
-R Recurse
-c List changed files
-v List all files
-f Hide errors
chown
Change the owner and/or group of each FILE to OWNER and/or GROUP
Options:
-R Recurse
-h Affect symlinks instead of symlink targets
-L Traverse all symlinks to directories
-H Traverse symlinks on command line only
-P Do not traverse symlinks (default)
-c List changed files
-v List all files
-f Hide errors
chpasswd
chpasswd [--md5|--encrypted]
Options:
-e,--encrypted Supplied passwords are in encrypted form
-m,--md5 Use MD5 encryption instead of DES
chpst
Options:
-u USER[:GRP] Set uid and gid
-U USER[:GRP] Set $UID and $GID in environment
-e DIR Set environment variables as specified by files
in DIR: file=1st_line_of_file
-/ DIR Chroot to DIR
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 9/70(W)
chroot
chrt
Options:
-p Operate on pid
-r Set scheduling policy to SCHED_RR
-f Set scheduling policy to SCHED_FIFO
-o Set scheduling policy to SCHED_OTHER
-m Show min and max priorities
chvt
chvt N
cksum
cksum FILES...
clear
clear
Clear screen
cmp
Options:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 10/70(W)
comm
Options:
-1 Suppress lines unique to FILE1
-2 Suppress lines unique to FILE2
-3 Suppress lines common to both files
cp
Options:
-a Same as -dpR
-d,-P Preserve links
-H,-L Dereference all symlinks (default)
-p Preserve file attributes if possible
-f Force overwrite
-i Prompt before overwrite
-R,-r Recurse
-l,-s Create (sym)links
cpio
Extract or list files from a cpio archive, or create a cpio archive Main operation mode:
-t List
-i Extract
-o Create
-p Passthrough
Options:
crond
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 11/70(W)
-L Log to file
-c Working dir
crontab
cryptpw
Options:
-P,--password-fd=NUM Read password from fd NUM
-m,--method=TYPE Encryption method TYPE
-S,--salt=SALT
cut
Options:
-b LIST Output only bytes from LIST
-c LIST Output only characters from LIST
-d CHAR Use CHAR instead of tab as the field delimiter
-s Output only the lines containing delimiter
-f N Print only these fields
-n Ignored
date
Options:
[-s] TIME Set time to TIME
-u Work in UTC (don't convert to local time)
-R Output RFC-822 compliant date string
-I[SPEC] Output ISO-8601 compliant date string
SPEC='date' (default) for date only,
'hours', 'minutes', or 'seconds' for date and
time to the indicated precision
-r FILE Display last modification time of FILE
-d TIME Display TIME, not 'now'
-D FMT Use FMT for -d TIME conversion
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 12/70(W)
hh:mm[:ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
dc
dc expression...
Tiny RPN calculator. Operations: +, add, -, sub, *, mul, /, div, %, mod, **, exp, and, or, not,
eor, p - print top of the stack (without altering the stack), f - print entire stack, o - pop the
value and set output radix (value must be 10 or 16). Examples: 'dc 2 2 add' -> 4, 'dc 8 8 * 2
2 + /' -> 16.
dd
Options:
if=FILE Read from FILE instead of stdin
of=FILE Write to FILE instead of stdout
bs=N Read and write N bytes at a time
ibs=N Read N bytes at a time
obs=N Write N bytes at a time
count=N Copy only N input blocks
skip=N Skip N input blocks
seek=N Skip N output blocks
conv=notrunc Don't truncate output file
conv=noerror Continue after read errors
conv=sync Pad blocks with zeros
conv=fsync Physically write data out before finishing
deallocvt
deallocvt [N]
delgroup
Delete group GROUP from the system or user USER from group GROUP
deluser
deluser USER
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 13/70(W)
devmem
df
Options:
-P POSIX output format
-k 1024-byte blocks (default)
-m 1M-byte blocks
-h Human readable (e.g. 1K 243M 2G)
-a Show all filesystems
-i Inodes
-B SIZE Blocksize
dhcprelay
diff
diff [-abdiNqrTstw] [-L LABEL] [-S FILE] [-U LINES] FILE1 FILE2
Compare files line by line and output the differences between them. This implementation
supports unified diffs only.
Options:
-a Treat all files as text
-b Ignore changes in the amount of whitespace
-d Try hard to find a smaller set of changes
-i Ignore case differences
-L Use LABEL instead of the filename in the unified header
-N Treat absent files as empty
-q Output only whether files differ
-r Recursively compare subdirectories
-S Start with FILE when comparing directories
-T Make tabs line up by prefixing a tab when necessary
-s Report when two files are the same
-t Expand tabs to spaces in output
-U Output LINES lines of context
-w Ignore all whitespace
dirname
dirname FILENAME
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 14/70(W)
dmesg
Options:
-c Clear ring buffer after printing
-n LEVEL Set console logging level
-s SIZE Buffer size
dnsd
dnsd [-c config] [-t seconds] [-p port] [-i iface-ip] [-d]
Options:
-c Config filename
-t TTL in seconds
-p Listening port
-i Listening ip (default all)
-d Daemonize
dos2unix
Convert FILE in-place from DOS to Unix format. When no file is given, use stdin/stdout.
Options:
-u dos2unix
-d unix2dos
dpkg
Options:
-i Install the package
-l List of installed packages
-C Configure an unpackaged package
-F depends Ignore dependency problems
-P Purge all files of a package
-r Remove all but the configuration files for a package
-u Unpack a package, but don't configure it
du
du [-aHLdclsxhmk] [FILE]...
Summarize disk space used for each FILE and/or directory. Disk space is printed in units of
1024 bytes.
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 15/70(W)
Options:
-a Show file sizes too
-H Follow symlinks on command line
-L Follow all symlinks
-d N Limit output to directories (and files with -a) of depth < N
-c Show grand total
-l Count sizes many times if hard linked
-s Display only a total for each argument
-x Skip directories on different filesystems
-h Sizes in human readable format (e.g., 1K 243M 2G )
-m Sizes in megabytes
-k Sizes in kilobytes (default)
dumpkmap
dumpleases
Options:
-f,--file=FILE Leases file to load
-r,--remaining Interpret lease times as time remaining
-a,--absolute Interpret lease times as expire time
echo
Options:
-n Suppress trailing newline
-e Interpret backslash-escaped characters (i.e., \t=tab)
-E Disable interpretation of backslash-escaped characters
ed
ed
eject
Options:
-s SCSI device
-t Close tray
-T Open/close tray (toggle)
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 16/70(W)
env
Print the current environment or run PROG after setting up the specified environment
Options:
-, -i Start with an empty environment
-u Remove variable from the environment
envdir
Set various environment variables as specified by files in the directory dir and run PROG
envuidgid
Set $UID to account's uid and $GID to account's gid and run PROG
expand
Options:
-i,--initial Do not convert tabs after non blanks
-t,--tabs=N Tabstops every N chars
expr
expr EXPRESSION
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 17/70(W)
Beware that many operators need to be escaped or quoted for shells. Comparisons are
arithmetic if both ARGs are numbers, else lexicographical. Pattern matches return the string
matched between \( and \) or null; if \( and \) are not used, they return the number of
characters matched or 0.
fakeidentd
Options:
-f Run in foreground
-i Inetd mode
-w Inetd 'wait' mode
-b ADDR Bind to specified address
STRING Ident answer string (default: nobody)
false
false
fbset
fbsplash
Options:
-s Image
-c Hide cursor
-d Framebuffer device (default /dev/fb0)
-i Config file (var=value):
BAR_LEFT,BAR_TOP,BAR_WIDTH,BAR_HEIGHT
BAR_R,BAR_G,BAR_B
-f Control pipe (else exit after drawing image)
commands: 'NN' (% for progress bar) or 'exit'
fdflush
fdflush DEVICE
fdformat
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 18/70(W)
Options:
-n Don't verify after format
fdisk
fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK
Options:
-u Start and End are in sectors (instead of cylinders)
-l Show partition table for each DISK, then exit
-b 2048 (for certain MO disks) use 2048-byte sectors
-C CYLINDERS Set number of cylinders/heads/sectors
-H HEADS
-S SECTORS
find
Search for files. The default PATH is the current directory, default EXPRESSION is '-print'
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 19/70(W)
findfs
flash_lock
Lock part or all of an MTD device. If SECTORS is -1, then all sectors will be locked,
regardless of the value of OFFSET
flash_unlock
flash_unlock MTD_DEVICE
fold
Wrap input lines in each FILE (standard input by default), writing to standard output
Options:
-b Count bytes rather than columns
-s Break at spaces
-w Use WIDTH columns instead of 80
free
free
freeramdisk
freeramdisk DEVICE
fsck
Options:
-A Walk /etc/fstab and check all filesystems
-N Don't execute, just show what would be done
-P With -A, check filesystems in parallel
-R With -A, skip the root filesystem
-T Don't show title on startup
-V Verbose
-C n Write status information to specified filedescriptor
-t type List of filesystem types to check
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 20/70(W)
fsck.minix
Options:
-l List all filenames
-r Perform interactive repairs
-a Perform automatic repairs
-v Verbose
-s Output superblock information
-m Show "mode not cleared" warnings
-f Force file system check
fsync
Options:
-d Avoid syncing metadata
ftpd
ftpd should be used as an inetd service. ftpd's line for inetd.conf: 21 stream tcp nowait root
ftpd ftpd /files/to/serve It also can be ran from tcpsvd:
tcpsvd -vE 0.0.0.0 21 ftpd /files/to/serve
Options:
-w Allow upload
-v Log to stderr
-S Log to syslog
-t,-T Idle and absolute timeouts
DIR Change root to this directory
ftpget
Options:
-c,--continue Continue previous transfer
-v,--verbose Verbose
-u,--username Username
-p,--password Password
-P,--port Port number
ftpput
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 21/70(W)
Options:
-v,--verbose Verbose
-u,--username Username
-p,--password Password
-P,--port Port number
fuser
Options:
-m Find processes which use same fs as FILEs
-4 Search only IPv4 space
-6 Search only IPv6 space
-s Silent: just exit with 0 if any processes are found
-k Kill found processes (otherwise display PIDs)
-SIGNAL Signal to send (default: TERM)
getopt
getopt [OPTIONS]
Options:
-a,--alternative Allow long options starting with single
-l,--longoptions=longopts Long options to be recognized
-n,--name=progname The name under which errors are reporte
-o,--options=optstring Short options to be recognized
-q,--quiet Disable error reporting by getopt(3)
-Q,--quiet-output No normal output
-s,--shell=shell Set shell quoting conventions
-T,--test Test for getopt(1) version
-u,--unquoted Don't quote the output
getty
Options:
-h Enable hardware (RTS/CTS) flow control
-i Do not display /etc/issue before running login
-L Local line, do not do carrier detect
-m Get baud rate from modem's CONNECT status message
-w Wait for a CR or LF before sending /etc/issue
-n Do not prompt the user for a login name
-f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue
-l LOGIN Invoke LOGIN instead of /bin/login
-t SEC Terminate after SEC if no username is read
-I INITSTR Send INITSTR before anything else
-H HOST Log HOST into the utmp file as the hostname
grep
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 22/70(W)
Options:
-H Prefix output lines with filename where match was found
-h Suppress the prefixing filename on output
-r Recurse
-i Ignore case distinctions
-l List names of files that match
-L List names of files that do not match
-n Print line number with output lines
-q Quiet. Return 0 if PATTERN is found, 1 otherwise
-v Select non-matching lines
-s Suppress file open/read error messages
-c Only print count of matching lines
-o Show only the part of a line that matches PATTERN
-m MAX Match up to MAX times per file
-w Match whole words only
-F PATTERN is a set of newline-separated strings
-E PATTERN is an extended regular expression
-e PTRN Pattern to match
-f FILE Read pattern from file
-A Print NUM lines of trailing context
-B Print NUM lines of leading context
-C Print NUM lines of output context
-z Input is NUL terminated
gunzip
Options:
-c Write to standard output
-f Force
-t Test file integrity
gzip
Options:
-c Write to standard output
-d Decompress
-f Force
hd
hd FILE...
hdparm
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 23/70(W)
Options:
-a Get/set fs readahead
-A Set drive read-lookahead flag (0/1)
-b Get/set bus state (0 == off, 1 == on, 2 == tristate)
-B Set Advanced Power Management setting (1-255)
-c Get/set IDE 32-bit IO setting
-C Check IDE power mode status
-d Get/set using_dma flag
-D Enable/disable drive defect-mgmt
-f Flush buffer cache for device on exit
-g Display drive geometry
-h Display terse usage information
-i Display drive identification
-I Detailed/current information directly from drive
-k Get/set keep_settings_over_reset flag (0/1)
-K Set drive keep_features_over_reset flag (0/1)
-L Set drive doorlock (0/1) (removable harddisks only)
-m Get/set multiple sector count
-n Get/set ignore-write-errors flag (0/1)
-p Set PIO mode on IDE interface chipset (0,1,2,3,4,...)
-P Set drive prefetch count
-Q Get/set DMA tagged-queuing depth (if supported)
-r Get/set readonly flag (DANGEROUS to set)
-R Register an IDE interface (DANGEROUS)
-S Set standby (spindown) timeout
-t Perform device read timings
-T Perform cache read timings
-u Get/set unmaskirq flag (0/1)
-U Un-register an IDE interface (DANGEROUS)
-v Defaults; same as -mcudkrag for IDE drives
-V Display program version and exit immediately
-w Perform device reset (DANGEROUS)
-W Set drive write-caching flag (0/1) (DANGEROUS)
-x Tristate device for hotswap (0/1) (DANGEROUS)
-X Set IDE xfer mode (DANGEROUS)
-y Put IDE drive in standby mode
-Y Put IDE drive to sleep
-Z Disable Seagate auto-powersaving mode
-z Re-read partition table
head
Print first 10 lines of each FILE to standard output. With more than one FILE, precede each
with a header giving the file name. With no FILE, or when FILE is -, read standard input.
Options:
-n NUM Print first NUM lines instead of first 10
-c NUM Output the first NUM bytes
-q Never output headers giving file names
-v Always output headers giving file names
hexdump
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 24/70(W)
Options:
-b One-byte octal display
-c One-byte character display
-C Canonical hex+ASCII, 16 bytes per line
-d Two-byte decimal display
-e FORMAT STRING
-f FORMAT FILE
-n LENGTH Interpret only LENGTH bytes of input
-o Two-byte octal display
-s OFFSET Skip OFFSET bytes
-v Display all input data
-x Two-byte hexadecimal display
-R Reverse of 'hexdump -Cv'
hostid
hostid
hostname
Options:
-s Short
-i Addresses for the hostname
-d DNS domain name
-f Fully qualified domain name
-F FILE Use FILE's content as hostname
httpd
httpd [-ifv[v]] [-c CONFFILE] [-p [IP:]PORT] [-u USER[:GRP]] [-r REALM] [-h HOME]
or httpd -d/-e/-m STRING
Options:
-i Inetd mode
-f Do not daemonize
-v[v] Verbose
-c FILE Configuration file (default httpd.conf)
-p [IP:]PORT Bind to ip:port (default *:80)
-u USER[:GRP] Set uid/gid after binding to port
-r REALM Authentication Realm for Basic Authentication
-h HOME Home directory (default .)
-m STRING MD5 crypt STRING
-e STRING HTML encode STRING
-d STRING URL decode STRING
hwclock
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 25/70(W)
Options:
-r Show hardware clock time
-s Set system time from hardware clock
-w Set hardware clock to system time
-u Hardware clock is in UTC
-l Hardware clock is in local time
-f FILE Use specified device (e.g. /dev/rtc2)
id
id [OPTIONS] [USER]
Options:
-u Print user ID
-g Print group ID
-G Print supplementary group IDs
-n Print name instead of a number
-r Print real user ID instead of effective ID
ifconfig
Options:
[add ADDRESS[/PREFIXLEN]]
[del ADDRESS[/PREFIXLEN]]
[[-]broadcast [ADDRESS]] [[-]pointopoint [ADDRESS]]
[netmask ADDRESS] [dstaddr ADDRESS]
[outfill NN] [keepalive NN]
[hw ether|infiniband ADDRESS] [metric NN] [mtu NN]
[[-]trailers] [[-]arp] [[-]allmulti]
[multicast] [[-]promisc] [txqueuelen NN] [[-]dynamic]
[mem_start NN] [io_addr NN] [irq NN]
[up|down] ...
ifdown
Options:
-a De/configure all interfaces automatically
-i FILE Use FILE for interface definitions
-n Print out what would happen, but don't do it
(note: doesn't disable mappings)
-m Don't run any mappings
-v Print out what would happen before doing it
-f Force de/configuration
ifenslave
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 26/70(W)
Options:
-c, --change-active Change active slave
-d, --detach Remove slave interface from bonding device
-f, --force Force, even if interface is not Ethernet
ifplugd
ifplugd [OPTIONS]
Options:
-n Do not daemonize
-s Do not log to syslog
-i IFACE Interface
-f/-F Treat link detection error as link down/link up
(otherwise exit on error)
-a Do not up interface automatically
-M Monitor creation/destruction of interface
(otherwise it must exist)
-r PROG Script to run
-x ARG Extra argument for script
-I Don't exit on nonzero exit code from script
-p Don't run script on daemon startup
-q Don't run script on daemon quit
-l Run script on startup even if no cable is detected
-t SECS Poll time in seconds
-u SECS Delay before running script after link up
-d SECS Delay after link down
-m MODE API mode (mii, priv, ethtool, wlan, auto)
-k Kill running daemon
ifup
Options:
-a De/configure all interfaces automatically
-i FILE Use FILE for interface definitions
-n Print out what would happen, but don't do it
(note: doesn't disable mappings)
-m Don't run any mappings
-v Print out what would happen before doing it
-f Force de/configuration
inetd
Options:
-f Run in foreground
-e Log to stderr
-q N Socket listen queue (default: 128)
-R N Pause services after N connects/min
(default: 0 - disabled)
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 27/70(W)
init
init
inotifyd
Run PROG on filesystem changes. When a filesystem event matching MASK occurs on
FILEn, PROG <actual_event(s)> <FILEn> [<subfile_name>] is run. Events:
a File is accessed
c File is modified
e Metadata changed
w Writable file is closed
0 Unwritable file is closed
r File is opened
D File is deleted
M File is moved
u Backing fs is unmounted
o Event queue overflowed
x File can't be watched anymore
If watching a directory:
inotifyd waits for PROG to exit. When x event happens for all FILEs, inotifyd exits
insmod
Options:
-f Force module to load into the wrong kernel version
-k Make module autoclean-able
-v Verbose
-q Quiet
-L Lock to prevent simultaneous loads of a module
-m Output load map to stdout
-o NAME Set internal module name to NAME
-x Do not export externs
install
install [-cdDsp] [-o USER] [-g GRP] [-m MODE] [source] dest|directory
Options:
-c Just copy (default)
-d Create directories
-D Create leading target directories
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 28/70(W)
ionice
Options:
-c Class. 1:realtime 2:best-effort 3:idle
-n Priority
ip
ipaddr
ipaddr {add|delete} IFADDR dev STRING ipaddr {show|flush} [dev STRING] [scope
SCOPE-ID] [to PREFIX] [label PATTERN] IFADDR := PREFIX | ADDR peer PREFIX
[broadcast ADDR] [anycast ADDR] [label STRING] [scope SCOPE-ID] SCOPE-ID :=
[host | link | global | NUMBER]
ipcalc
Options:
-b,--broadcast Display calculated broadcast address
-n,--network Display calculated network address
-m,--netmask Display default netmask for IP
-p,--prefix Display the prefix for IP/NETMASK
-h,--hostname Display first resolved host name
-s,--silent Don't ever display error messages
ipcrm
Upper-case options MQS remove an object by shmkey value. Lower-case options remove
an object by shmid value.
Options:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 29/70(W)
ipcs
-t Time
-c Creator
-p Pid
-l Limits
-u Summary
iplink
iplink set DEVICE { up | down | arp | multicast { on | off } | dynamic { on | off } | mtu
MTU } iplink show [DEVICE]
iproute
iproute { list | flush } SELECTOR iproute get ADDRESS [from ADDRESS iif STRING]
[oif STRING] [tos TOS] iproute { add | del | change | append | replace | monitor } ROUTE
SELECTOR := [root PREFIX] [match PREFIX] [proto RTPROTO] ROUTE := [TYPE]
PREFIX [tos TOS] [proto RTPROTO] [metric METRIC]
iprule
iptunnel
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 30/70(W)
kbd_mode
Options:
-a Default (ASCII)
-k Medium-raw (keyboard)
-s Raw (scancode)
-u Unicode (utf-8)
-C TTY Affect TTY instead of /dev/tty
kill
Options:
-l List all signal names and numbers
killall
Options:
-l List all signal names and numbers
-q Do not complain if no processes were killed
killall5
Options:
-l List all signal names and numbers
-o PID Do not signal this PID
klogd
Kernel logger
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 31/70(W)
Options:
-c N Only messages with level < N are printed to console
-n Run in foreground
last
Show listing of the last users that logged into the system
Options:
-W Display with no host column truncation
-f file Read from file instead of /var/log/wtmp
length
length STRING
less
View a file or list of files. The position within files can be changed, and files can be
manipulated in various ways.
Options:
-E Quit once the end of a file is reached
-M,-m Display status line with line numbers
and percentage through the file
-N Prefix line number to each line
-I Ignore case in all searches
-~ Suppress ~s displayed past the end of the file
ln
Options:
-s Make symlinks instead of hardlinks
-f Remove existing destination files
-n Don't dereference symlinks - treat like normal file
-b Make a backup of the target (if exists) before link operation
-S suf Use suffix instead of ~ when making backup files
loadfont
loadkmap
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 32/70(W)
logger
Options:
-s Log to stderr as well as the system log
-t TAG Log using the specified tag (defaults to user name)
-p PRIO Priority (numeric or facility.level pair)
login
Options:
-f Do not authenticate (user already authenticated)
-h Name of the remote host
-p Preserve environment
logname
logname
logread
logread [OPTIONS]
Options:
-f Output data as log grows
losetup
Options:
-o OFS Start OFS bytes into FILE
-f Show first free loop device
lpd
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 33/70(W)
SPOOLDIR must contain (symlinks to) device nodes or directories with names matching
print queue names. In the first case, jobs are sent directly to the device. Otherwise each job
is stored in queue directory and HELPER program is called. Name of file to print is passed
in $DATAFILE variable. Example:
tcpsvd -E 0 515 softlimit -m 999999 lpd /var/spool ./print
lpq
Options:
-P lp service to connect to (else uses $PRINTER)
-d Delete jobs
-f Force any waiting job to be printed
-s Short display
lpr
Options:
-P lp service to connect to (else uses $PRINTER)
-m Send mail on completion
-h Print banner page too
-V Verbose
ls
ls [-1AacCdeFilnpLRrSsTtuvwxXhk] [FILE]...
Options:
-1 List in a single column
-A Don't list . and ..
-a Don't hide entries starting with .
-C List by columns
-c With -l: sort by ctime
--color[={always,never,auto}] Control coloring
-d List directory entries instead of contents
-e List full date and time
-F Append indicator (one of */=@|) to entries
-i List inode numbers
-l Long listing format
-n List numeric UIDs and GIDs instead of names
-p Append indicator (one of /=@|) to entries
-L List entries pointed to by symlinks
-R List subdirectories recursively
-r Sort in reverse order
-S Sort by file size
-s List the size of each file, in blocks
-T NUM Assume tabstop every NUM columns
-t With -l: sort by modification time
-u With -l: sort by access time
-v Sort by version
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 34/70(W)
lsattr
Options:
-R Recursively list subdirectories
-a Do not hide entries starting with .
-d List directory entries instead of contents
-l List long flag names
-v List the file's version/generation number
lsmod
lsmod
lzmacat
lzmacat FILE
Uncompress to stdout
lzop
lzopcat
makemime
Options:
-o FILE Output. Default: stdout
-a HDR Add header. Examples:
"From: [email protected]", "Date: `date -R`"
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 35/70(W)
man
Options:
-a Display all pages
-w Show page locations
md5sum
Options:
-c Check sums against given list
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines
mdev
mdev [-s]
-s Scan /sys and populate /dev during system boot
mesg
mesg [y|n]
microcom
Options:
-d Wait up to DELAY ms for TTY output before sending every
next byte to it
-t Exit if both stdin and TTY are silent for TIMEOUT ms
-s Set serial line to SPEED
-X Disable special meaning of NUL and Ctrl-X from stdin
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 36/70(W)
mkdir
Create DIRECTORY
Options:
-m Mode
-p No error if exists; make parent directories as needed
mkdosfs
Options:
-v Verbose
-n LBL Volume label
mkfifo
Options:
-m MODE Mode (default a=rw)
mkfs.minix
Options:
-c Check device for bad blocks
-n [14|30] Maximum length of filenames
-i INODES Number of inodes for the filesystem
-l FILENAME Read bad blocks list from FILENAME
-v Make version 2 filesystem
mkfs.vfat
Options:
-v Verbose
-n LBL Volume label
mknod
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 37/70(W)
Options:
-m Create the special file using the specified mode (default a=rw)
TYPEs include:
mkpasswd
Options:
-P,--password-fd=NUM Read password from fd NUM
-m,--method=TYPE Encryption method TYPE
-S,--salt=SALT
mkswap
mkswap DEVICE
mktemp
Create a temporary file with name based on TEMPLATE and print its name. TEMPLATE
must end with XXXXXX (e.g. [/dir/]nameXXXXXX).
Options:
-d Make a directory instead of a file
-t Generate a path rooted in temporary directory
-p DIR Use DIR as a temporary directory (implies -t)
For -t or -p, directory is chosen as follows: $TMPDIR if set, else -p DIR, else /tmp
modprobe
Options:
-k Make module autoclean-able
-n Dry run
-q Quiet
-r Remove module (stacks) or do autoclean
-s Report via syslog instead of stderr
-v Verbose
-b Apply blacklist to module names too
more
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 38/70(W)
more [FILE]...
mount
Options:
-a Mount all filesystems in fstab
-f Dry run
-i Don't run mount helper
-r Read-only mount
-w Read-write mount (default)
-t FSTYPE Filesystem type
-O OPT Mount only filesystems with option OPT (-a only)
-o OPT:
loop Ignored (loop devices are autodetected)
[a]sync Writes are [a]synchronous
[no]atime Disable/enable updates to inode access times
[no]diratime Disable/enable atime updates to directories
[no]relatime Disable/enable atime updates relative to modification t
[no]dev (Dis)allow use of special device files
[no]exec (Dis)allow use of executable files
[no]suid (Dis)allow set-user-id-root programs
[r]shared Convert [recursively] to a shared subtree
[r]slave Convert [recursively] to a slave subtree
[r]private Convert [recursively] to a private subtree
[un]bindable Make mount point [un]able to be bind mounted
bind Bind a directory to an additional location
move Relocate an existing mount point
remount Remount a mounted filesystem, changing its flags
ro/rw Read-only/read-write mount
There are EVEN MORE flags that are specific to each filesystem You'll have to see the
written documentation for those filesystems
mountpoint
Options:
-q Quiet
-d Print major/minor device number of the filesystem
-n Print device name of the filesystem
-x Print major/minor device number of the blockdevice
mt
Available Opcodes:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 39/70(W)
bsf bsfm bsr bss datacompression drvbuffer eof eom erase fsf fsfm fsr fss load lock mkpart
nop offline ras1 ras2 ras3 reset retension rewind rewoffline seek setblk setdensity setpart tell
unload unlock weof wset
mv
Options:
-f Don't prompt before overwriting
-i Interactive, prompt before overwrite
nameif
Options:
-c FILE Use configuration file (default: /etc/mactab)
-s Use syslog (LOCAL0 facility)
IFNAME MACADDR new_interface_name interface_mac_address
nc
Options:
-e PROG Run PROG after connect (must be last)
-l Listen mode, for inbound connects
-n Don't do DNS resolution
-s ADDR Local address
-p PORT Local port
-u UDP mode
-v Verbose
-w SEC Timeout for connects and final net reads
-i SEC Delay interval for lines sent
-o FILE Hex dump traffic
-z Zero-I/O mode (scanning)
netstat
netstat [-laentuwxrWp]
Options:
-l Display listening server sockets
-a Display all sockets (default: connected)
-e Display other/more information
-n Don't resolve names
-t Tcp sockets
-u Udp sockets
-w Raw sockets
-x Unix sockets
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 40/70(W)
nice
Options:
-n ADJUST Adjust priority by ADJUST
nmeter
nmeter format_string
Format specifiers:
%Nc or %[cN] Monitor CPU. N - bar size, default 10
(displays: S:system U:user N:niced D:iowait I:irq i:softirq)
%[niface] Monitor network interface 'iface'
%m Monitor allocated memory
%[mf] Monitor free memory
%[mt] Monitor total memory
%s Monitor allocated swap
%f Monitor number of used file descriptors
%Ni Monitor total/specific IRQ rate
%x Monitor context switch rate
%p Monitor forks
%[pn] Monitor # of processes
%b Monitor block io
%Nt Show time (with N decimal points)
%Nd Milliseconds between updates (default:1000)
%r Print <cr> instead of <lf> at EOL
nohup
nslookup
Query the nameserver for the IP address of the given HOST optionally using a specified
DNS server
od
openvt
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 41/70(W)
Options:
-c N Use specified VT
-s Switch to the VT
-w Wait for PROG to exit
passwd
Change USER's password. If no USER is specified, changes the password for the current
user.
Options:
-a Algorithm to use for password (choices: des, md5)
-d Delete password for the account
-l Lock (disable) account
-u Unlock (re-enable) account
patch
pgrep
Options:
-l Show command name too
-f Match against entire command line
-n Show the newest process only
-o Show the oldest process only
-v Negate the match
-x Match whole name (not substring)
-s Match session ID (0 for current)
-P Match parent process ID
pidof
Options:
-s Show only one PID
-o PID Omit given pid
Use %PPID to omit pid of pidof's parent
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 42/70(W)
ping
Options:
-4, -6 Force IPv4 or IPv6 hostname resolution
-c CNT Send only CNT pings
-s SIZE Send SIZE data bytes in packets (default:56)
-I IFACE/IP Use interface or IP address as source
-W SEC Seconds to wait for the first response (default:10)
(after all -c CNT packets are sent)
-w SEC Seconds until ping exits (default:infinite)
(can exit earlier with -c CNT)
-q Quiet, only displays output at start
and when finished
ping6
Options:
-c CNT Send only CNT pings
-s SIZE Send SIZE data bytes in packets (default:56)
-I IFACE/IP Use interface or IP address as source
-q Quiet, only displays output at start
and when finished
pivot_root
Move the current root file system to PUT_OLD and make NEW_ROOT the new root file
system
pkill
Options:
-l List all signals
-f Match against entire command line
-n Signal the newest process only
-o Signal the oldest process only
-v Negate the match
-x Match whole name (not substring)
-s Match session ID (0 for current)
-P Match parent process ID
popmaildir
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 43/70(W)
Options:
-b Binary mode. Ignored
-d Debug. Ignored
-m Show used memory. Ignored
-V Show version. Ignored
-c Use tcpclient. Ignored
-a Use APOP protocol. Implied. If server supports APOP
-s Skip authorization
-T Get messages with TOP instead with RETR
-k Keep retrieved messages on the server
-t timeout Network timeout
-F "program arg1 arg2 ..." Filter by program. May be multiple
-M "program arg1 arg2 ..." Deliver by program
-R size Remove old messages on the server >= size (in bytes). I
-Z N1-N2 Remove messages from N1 to N2 (dangerous). Ignored
-L size Do not retrieve new messages >= size (in bytes). Ignore
-H lines Type specified number of lines of a message. Ignored
printenv
printenv [VARIABLE...]
Print all or part of environment. If no environment VARIABLE specified, print them all.
printf
Format and print ARGUMENT(s) according to FORMAT, where FORMAT controls the
output exactly as in C printf
ps
ps
Options:
-o col1,col2=header Select columns for display
-T Show threads
pscan
pscan [-cb] [-p MIN_PORT] [-P MAX_PORT] [-t TIMEOUT] [-T MIN_RTT] HOST
Options:
-c Show closed ports too
-b Show blocked ports too
-p Scan from this port (default 1)
-P Scan up to this port (default 1024)
-t Timeout (default 5000 ms)
-T Minimum rtt (default 5 ms, increase for congested hosts)
pwd
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 44/70(W)
pwd
raidautorun
raidautorun DEVICE
rdate
Get and possibly set the system date and time from a remote HOST
Options:
-s Set the system date and time (default)
-p Print the date and time
rdev
rdev
Print the device node associated with the filesystem mounted at '/'
readlink
Options:
-f Canonicalize by following all symlinks
-n Don't add newline
-v Verbose
readprofile
readprofile [OPTIONS]
Options:
-m mapfile (Default: /boot/System.map)
-p profile (Default: /proc/profile)
-M mult Set the profiling multiplier to mult
-i Print only info about the sampling step
-v Verbose
-a Print all symbols, even if count is 0
-b Print individual histogram-bin counts
-s Print individual counters within functions
-r Reset all the counters (root only)
-n Disable byte order auto-detection
realpath
realpath pathname...
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 45/70(W)
reformime
Options:
-x prefix Extract content of MIME sections to files
-X prog [args] Filter content of MIME sections through prog.
Must be the last option
renice
Options:
-n Adjust current nice value (smaller is faster)
-p Process id(s) (default)
-g Process group id(s)
-u Process user name(s) and/or id(s)
reset
reset
resize
resize
rm
rm [OPTIONS] FILE...
Remove (unlink) the FILE(s). Use '--' to indicate that all following arguments are non-
options.
Options:
-i Always prompt before removing
-f Never prompt
-r,-R Remove directories recursively
rmdir
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 46/70(W)
Options:
-p|--parents Include parents
--ignore-fail-on-non-empty
rmmod
Options:
-w Wait until the module is no longer used
-f Force unloading
-a Remove all unused modules (recursively)
route
route [{add|del|delete}]
Options:
-n Don't resolve names
-e Display other/more information
-A inet{6} Select address family
rpm
Options:
-i Install package
-q Query package
-p Query uninstalled package
-i Show information
-l List contents
-d List documents
-c List config files
rpm2cpio
rpm2cpio package.rpm
rtcwake
rtcwake [-a | -l | -u] [-d DEV] [-m MODE] [-s SEC | -t TIME]
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 47/70(W)
run-parts
Options:
-t Print what would be run, but don't actually run anything
-a ARG Pass ARG as argument for every program
-u MASK Set the umask to MASK before running every program
-l Print names of all matching files even if they are not executab
runlevel
runlevel [utmp]
runsv
runsv dir
runsvdir
rx
rx FILE
script
Options:
-a Append output
-c Run PROG, not shell
-f Flush output after each write
-q Quiet
-t Send timing to stderr
scriptreplay
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 48/70(W)
sed
Options:
-e CMD Add CMD to sed commands to be executed
-f FILE Add FILE contents to sed commands to be executed
-i Edit files in-place
-n Suppress automatic printing of pattern space
-r Use extended regex syntax
sendmail
Standard options:
-t Read additional recipients from message body
-f sender Sender (required)
-o options Various options. -oi implied, others are ignored
Other options are silently ignored; -oi -t is implied Use makemime applet to create message
with attachments
seq
Print numbers from FIRST to LAST, in steps of INC. FIRST, INC default to 1
Options:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 49/70(W)
setarch
setconsole
Options:
-r Reset output to /dev/console
setfont
Options:
-m MAPFILE Load console screen map
-C TTY Affect TTY instead of /dev/tty
setkeycodes
Set entries into the kernel's scancode-to-keycode map, allowing unusual keyboards to
generate usable keycodes.
setlogcons
setlogcons N
setsid
Run PROG in a new session. PROG will have no controlling terminal and will not be
affected by keyboard signals (Ctrl-C etc). See setsid(2) for details.
setuidgid
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 50/70(W)
Set uid and gid to account's uid and gid, removing all supplementary groups and run PROG
sha1sum
Options:
-c Check sums against given list
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines
sha256sum
Options:
-c Check sums against given list
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines
sha512sum
Options:
-c Check sums against given list
-s Don't output anything, status code shows success
-w Warn about improperly formatted checksum lines
showkey
Options:
-a Display decimal/octal/hex values of the keys
-k Display interpreted keycodes (default)
-s Display raw scan-codes
slattach
Options:
-p PROT Set protocol (slip, cslip, slip6, clisp6 or adaptive)
-s SPD Set line speed
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 51/70(W)
sleep
sleep [N]...
Pause for a time equal to the total of the args given, where each arg can have an optional
suffix of (s)econds, (m)inutes, (h)ours, or (d)ays
softlimit
Options:
-a BYTES Limit total size of all segments
-m BYTES Same as -d BYTES -s BYTES -l BYTES -a BYTES
-d BYTES Limit data segment
-s BYTES Limit stack segment
-l BYTES Limit locked memory size
-o N Limit number of open files per process
-p N Limit number of processes per uid
Options controlling file sizes:
sort
Options:
-b Ignore leading blanks
-c Check whether input is sorted
-d Dictionary order (blank or alphanumeric only)
-f Ignore case
-g General numerical sort
-i Ignore unprintable characters
-k Sort key
-M Sort month
-n Sort numbers
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 52/70(W)
-o Output to file
-k Sort by key
-t CHAR Key separator
-r Reverse sort order
-s Stable (don't sort ties alphabetically)
-u Suppress duplicate lines
-z Lines are terminated by NUL, not newline
-mST Ignored for GNU compatibility
split
Options:
-b n[k|m] Split by bytes
-l n Split by lines
-a n Use n letters as suffix
start-stop-daemon
Search for matching processes, and then -K: stop all matching processes. -S: start a process
unless a matching process is found.
Process matching:
-u,--user USERNAME|UID
Match only this user's processes
-n,--name NAME Match processes with NAME
in comm field in /proc/PID/stat
-x,--exec EXECUTABLE Match processes with this command
in /proc/PID/cmdline
-p,--pidfile FILE Match a process with PID from the file
All specified conditions must match
-S only:
-x,--exec EXECUTABLE Program to run
-a,--startas NAME Zeroth argument
-b,--background Background
-N,--nicelevel N Change nice level
-c,--chuid USER[:[GRP]] Change to user/group
-m,--make-pidfile Write PID to the pidfile specified by -p
-K only:
-s,--signal SIG Signal to send
-t,--test Match only, exit with 0 if a process is found
Other:
stat
Options:
-c fmt Use the specified format
-f Display filesystem status
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 53/70(W)
-L Dereference links
-t Display info in terse form
strings
Options:
-a Scan whole file (default)
-f Precede strings with filenames
-n LEN At least LEN characters form a string (default 4)
-o Precede strings with decimal offsets
stty
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 54/70(W)
Without arguments, prints baud rate, line discipline, and deviations from stty sane
Options:
-F DEVICE Open device instead of stdin
-a Print all current settings in human-readable form
-g Print in stty-readable form
[SETTING] See manpage
su
Options:
-p, -m Preserve environment
-c CMD Command to pass to 'sh -c'
-s SH Shell to use instead of default shell
sulogin
Options:
-t N Timeout
sum
Options:
-r Use BSD sum algorithm (1K blocks)
-s Use System V sum algorithm (512byte blocks)
sv
Control services monitored by runsv supervisor. Commands (only first character is enough):
status: query service status up: if service isn't running, start it. If service stops, restart it
once: like 'up', but if service stops, don't restart it down: send TERM and CONT signals.
If ./run exits, start ./finish if it exists. After it stops, do not restart service exit: send TERM
and CONT signals to service and log service. If they exit, runsv exits too pause, cont, hup,
alarm, interrupt, quit, 1, 2, term, kill: send STOP, CONT, HUP, ALRM, INT, QUIT, USR1,
USR2, TERM, KILL signal to service
svlogd
svlogd [-ttv] [-r c] [-R abc] [-l len] [-b buflen] dir...
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 55/70(W)
Continuously read log data from standard input, optionally filter log messages, and write the
data to one or more automatically rotated logs
swapoff
Options:
-a Stop swapping on all swap devices
swapon
Options:
-a Start swapping on all swap devices
-p pri Set swap device priority
switch_root
Options:
-c DEV Reopen stdio to DEV after switch
sync
sync
sysctl
Options:
-n Don't print key names
-e Don't warn about unknown keys
-w Change sysctl setting
-p FILE Load sysctl settings from FILE (default /etc/sysctl.conf)
-a Display all values
-A Display all values in table form
syslogd
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 56/70(W)
syslogd [OPTIONS]
System logging utility. Note that this version of syslogd ignores /etc/syslog.conf.
Options:
-n Run in foreground
-O FILE Log to given file (default:/var/log/messages)
-l n Set local log level
-S Smaller logging output
-s SIZE Max size (KB) before rotate (default:200KB, 0=off)
-b NUM Number of rotated logs to keep (default:1, max=99, 0=pu
-R HOST[:PORT] Log to IP or hostname on PORT (default PORT=514/UDP)
-L Log locally and via network (default is network only if
-D Drop duplicates
-C[size(KiB)] Log to shared mem buffer (read it using logread)
tac
tac [FILE]...
tail
Print last 10 lines of each FILE to standard output. With more than one FILE, precede each
with a header giving the file name. With no FILE, or when FILE is -, read standard input.
Options:
-c N[kbm] Output the last N bytes
-n N[kbm] Print last N lines instead of last 10
-f Output data as the file grows
-q Never output headers giving file names
-s SEC Wait SEC seconds between reads with -f
-v Always output headers giving file names
If the first character of N (bytes or lines) is a '+', output begins with the Nth item from the
start of each file, otherwise, print the last N items in the file. N bytes may be suffixed by k
(x1024), b (x512), or m (1024^2).
tar
Options:
c Create
x Extract
t List
Archive format selection:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 57/70(W)
taskset
Options:
-p Operate on an existing PID
tcpsvd
tcpsvd [-hEv] [-c N] [-C N[:MSG]] [-b N] [-u USER] [-l NAME] IP PORT PROG
Create TCP socket, bind to IP:PORT and listen for incoming connection. Run PROG for
each connection.
IP IP to listen on. '0' = all
PORT Port to listen on
PROG [ARGS] Program to run
-l NAME Local hostname (else looks up local hostname in DNS)
-u USER[:GRP] Change to user/group after bind
-c N Handle up to N connections simultaneously
-b N Allow a backlog of approximately N TCP SYNs
-C N[:MSG] Allow only up to N connections from the same IP
New connections from this IP address are closed
immediately. MSG is written to the peer before close
-h Look up peer's hostname
-E Do not set up environment variables
-v Verbose
tee
Options:
-a Append to the given FILEs, do not overwrite
-i Ignore interrupt signals (SIGINT)
telnet
Options:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 58/70(W)
telnetd
telnetd [OPTIONS]
Options:
-l LOGIN Exec LOGIN on connect
-f ISSUE_FILE Display ISSUE_FILE instead of /etc/issue
-K Close connection as soon as login exits
(normally wait until all programs close slave pty)
-p PORT Port to listen on
-b ADDR[:PORT] Address to bind to
-F Run in foreground
-i Run as inetd service
-w SEC Run as inetd service in wait mode, linger time SEC
-S Log to syslog (implied by -i or without -F and -w)
test
test EXPRESSION ]
Check file types, compare values etc. Return a 0/1 exit code depending on logical value of
EXPRESSION
tftp
Options:
-l FILE Local FILE
-r FILE Remote FILE
-g Get file
-p Put file
-b SIZE Transfer blocks of SIZE octets
tftpd
tftpd should be used as an inetd service. tftpd's line for inetd.conf: 69 dgram udp nowait root
tftpd tftpd /files/to/serve It also can be ran from udpsvd:
udpsvd -vE 0.0.0.0 69 tftpd /files/to/serve
Options:
-r Prohibit upload
-c Allow file creation via upload
-u Access files as USER
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 59/70(W)
time
Options:
-v Verbose
timeout
Runs PROG. Sends SIG to it if it is not gone in SECS seconds. Defaults: SECS: 10, SIG:
TERM.
top
Provide a view of process activity in real time. Read the status of all processes from /proc
each SECONDS and show the status for however many processes will fit on the screen.
touch
Options:
-c Do not create files
-d DT Date/time to use
tr
Translate, squeeze, and/or delete characters from standard input, writing to standard output
Options:
-c Take complement of STRING1
-d Delete input characters coded STRING1
-s Squeeze multiple output characters of STRING2 into one characte
traceroute
Options:
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 60/70(W)
true
true
tty
tty
Options:
-s Print nothing, only return exit status
ttysize
udhcpc
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 61/70(W)
udhcpd
DHCP server
-f Run in foreground
-S Log to syslog too
udpsvd
Create UDP socket, bind to IP:PORT and wait for incoming packets. Run PROG for each
packet, redirecting all further packets with same peer ip:port to it.
IP IP to listen on. '0' = all
PORT Port to listen on
PROG [ARGS] Program to run
-l NAME Local hostname (else looks up local hostname in DNS)
-u USER[:GRP] Change to user/group after bind
-c N Handle up to N connections simultaneously
-h Look up peer's hostname
-E Do not set up environment variables
-v Verbose
umount
Options:
-a Unmount all file systems
-r Try to remount devices as read-only if mount is busy
-l Lazy umount (detach filesystem)
-f Force umount (i.e., unreachable NFS server)
-d Free loop device if it has been used
uname
uname [-amnrspv]
Options:
-a Print all
-m The machine (hardware) type
-n Hostname
-r OS release
-s OS name (default)
-p Processor type
-v OS version
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 62/70(W)
uncompress
Uncompress .Z file[s]
Options:
-c Extract to stdout
-f Overwrite an existing file
unexpand
Options:
-a,--all Convert all blanks
-f,--first-only Convert only leading blanks
-t,--tabs=N Tabstops every N chars
uniq
Options:
-c Prefix lines by the number of occurrences
-d Only print duplicate lines
-u Only print unique lines
-f N Skip first N fields
-s N Skip first N chars (after any skipped fields)
-w N Compare N characters in line
unix2dos
Convert FILE in-place from Unix to DOS format. When no file is given, use stdin/stdout.
Options:
-u dos2unix
-d unix2dos
unlzma
Options:
-c Write to standard output
-f Force
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 63/70(W)
unlzop
unzip
Options:
-l List archive contents (with -q for short form)
-n Never overwrite existing files (default)
-o Overwrite files without prompting
-p Send output to stdout
-q Quiet
-x Exclude these files
-d Extract files into this directory
uptime
uptime
usleep
usleep N
uudecode
uuencode
Options:
-m Use base64 encoding per RFC1521
vconfig
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 64/70(W)
Options:
add [interface-name] [vlan_id]
rem [vlan-name]
set_flag [interface-name] [flag-num] [0 | 1]
set_egress_map [vlan-name] [skb_priority] [vlan_qos]
set_ingress_map [vlan-name] [skb_priority] [vlan_qos]
set_name_type [name-type]
vi
vi [OPTIONS] [FILE]...
Edit FILE
Options:
-c Initial command to run ($EXINIT also available)
-R Read-only - do not write to the file
-H Short help regarding available features
vlock
vlock [OPTIONS]
Options:
-a Lock all VTs
volname
volname [DEVICE]
watch
Options:
-n Loop period in seconds (default 2)
-t Don't print header
watchdog
Options:
-T N Reboot after N seconds if not reset (default 60)
-t N Reset every N seconds (default 30)
-F Run in foreground
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 65/70(W)
wc
wc [OPTIONS] [FILE]...
Print line, word, and byte counts for each FILE, and a total line if more than one FILE is
specified. With no FILE, read standard input.
Options:
-c Print the byte counts
-l Print the newline counts
-L Print the length of the longest line
-w Print the word counts
wget
Options:
-s Spider mode - only check file existence
-c Continue retrieval of aborted transfer
-q Quiet
-P Set directory prefix to DIR
-O Save to filename ('-' for stdout)
-U Adjust 'User-Agent' field
-Y Use proxy ('on' or 'off')
which
which [COMMAND]...
Locate a COMMAND
who
who [-a]
Options:
-a show all
whoami
whoami
Print the user name associated with the current effective user id
xargs
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 66/70(W)
Options:
-p Ask user whether to run each command
-r Do not run command if input is empty
-0 Input is separated by NUL characters
-t Print the command on stderr before execution
-e[STR] STR stops input processing
-n N Pass no more than N args to PROG
-s N Pass command line of no more than N bytes
-x Exit if size is exceeded
yes
zcat
zcat FILE
Uncompress to stdout
zcip
Options:
-f Run in foreground
-q Quit after obtaining address
-r 169.254.x.x Request this address first
-v Verbose
With no -q, runs continuously monitoring for ARP conflicts, exits only on I/O errors (link
down etc)
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.
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 67/70(W)
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.
MAINTAINER
Denis Vlasenko <[email protected]>
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.
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 68/70(W)
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 69/70(W)
mktemp.c
http://www.busybox.net/downloads/BusyBox.html 2010/10/26
w 70/70(W)
http://www.busybox.net/downloads/BusyBox.html 2010/10/26