BUSYBOX(1)
π BUSYBOX(1) π
manual name: busybox π
β¨ NAME β¨
BusyBox β The Swiss Army Knife of Embedded Linux
π οΈ SYNTAX π οΈ
busybox <applet> [arguments...] # or
<applet> [arguments...] # if symlinked
π DESCRIPTION π
Okay so BusyBox? It's literally a bunch of tiny versions of common UNIX utilities packed into one small executable. Iconic. It's your minimalist replacement for most of the stuff you'd usually find in GNU coreutils, util-linux, etc. Fr fr, the utilities in BusyBox generally have fewer options than their full-featured GNU cousins β but the options that do make the cut provide the expected functionality and behave very much like their GNU counterparts. π
It was written with size-optimization and limited resources in mind β no cap. It's also extremely modular, so you can easily include or exclude commands (or features) at compile time. I'm obsessed because that makes customizing your embedded systems easy-peasy. To create a working system, just add /dev, /etc, and a Linux kernel. BusyBox gives you a fairly complete POSIX environment for any small or embedded system. π¦
BusyBox is extremely configurable. That means you can include only the components you need, which reduces binary size. Run make config or make menuconfig to pick the functionality you want to enable. Then run make to compile BusyBox using your configuration. Periodt. β¨
After the compile finishes, use make install to install BusyBox. This installs the bin/busybox binary in the target directory specified by CONFIG_PREFIX. You can set CONFIG_PREFIX when configuring BusyBox, or 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), those 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 does the same job as more than one utility program. That means there's just a single BusyBox binary, but that single binary acts like a large number of utilities. This lets BusyBox be smaller since all the built-in utility programs (we call them applets) can share code for lots of 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 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. iykyk β¨
π« COMMON OPTIONS π«
Most BusyBox applets support the --help argument to provide a terse runtime description of their behavior β it's giving helpful main character energy. If the CONFIG_FEATURE_VERBOSE_USAGE option has been enabled, more detailed usage information will also be available. π«Ά
π COMMANDS π
Currently available applets include:
[, [[, ascii, ash, base32, basename, blockdev, bunzip2, bzcat, cat,
chroot, chvt, clear, cp, cpio, crc32, cut, date, dd, depmod, df,
dirname, dmesg, dnsdomainname, du, echo, egrep, eject, env, expr,
false, fbset, fdisk, fgconsole, fgrep, ftpget, gunzip, gzip, halt,
head, i2ctransfer, insmod, ip, ipaddr, iplink, iproute, kill,
killall, killall5, linux32, linux64, ln, ls, lsmod, lzcat, md5sum,
mdev, mkdir, mknod, modinfo, modprobe, mount, mv, ping, ping6,
poweroff, ps, pwd, reboot, reset, rm, rmdir, rmmod, run-parts,
setkeycodes, sh, sha1sum, sha256sum, sha3sum, sha512sum, shuf,
sleep, swapoff, swapon, sync, tail, tar, tee, test, true, truncate,
ts, umount, uname, unlink, unlzma, unxz, unzip, xzcat, yes, zcat
π§ COMMAND DESCRIPTIONS π§
ash
ash [-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] |
FILE ARGS | -s ARGS]
Unix shell interpreter π
base32
base32 [-d] [-w COL] [FILE]
Base32 encode or decode FILE to standard output.
-dβ Decode data-w COLβ Wrap lines atCOL(default76,0disables)
basename
basename FILE [SUFFIX] | -a FILE... | -s SUFFIX FILE...
Strip directory path and SUFFIX from FILE.
-aβ All arguments areFILEs-s SUFFIXβ RemoveSUFFIX(implies-a)
blockdev
blockdev OPTION BLOCKDEV
Talk to a block device with the chosen OPTION, bestie. π§±
--setroβ Set ro--setrwβ Set rw--getroβ Get ro--getssβ Get sector size--getbszβ Get block size--setbsz BYTESβ Set block size--getszβ Get device size in 512-byte sectors--getsize64β Get device size in bytes--getraβ Get readahead in 512-byte sectors--setra SECTORSβ Set readahead--flushbufsβ Flush buffers--rereadptβ Reread partition table
bunzip2
bunzip2 [-cfk] [FILE]...
Decompress FILEs (or stdin).
-cβ Write to stdout-fβ Force-kβ Keep input files-tβ Test integrity
bzcat
bzcat [FILE]...
Decompress to stdout.
cat
cat [-nbvteA] [FILE]...
Print FILEs to stdout. π
-nβ Number output lines-bβ Number nonempty lines-vβ Show nonprinting characters as^xorM-x-tβ ...and tabs as^I-eβ ...and end lines with$-Aβ Same as-vte
chroot
chroot NEWROOT [PROG ARGS]
Run PROG with root directory set to NEWROOT.
chvt
chvt N
Change the foreground virtual terminal to /dev/ttyN.
clear
clear
Clear screen. Sparkling. β¨
cp
cp [-arPLHpfinlsTu] SOURCE DEST
or: cp [-arPLHpfinlsu] SOURCE... { -t DIRECTORY | DIRECTORY }
Copy SOURCEs to DEST.
-aβ Same as-dpR-R,-rβ Recurse-d,-Pβ Preserve symlinks (default if-R)-Lβ Follow all symlinks-Hβ Follow symlinks on command line-pβ Preserve file attributes if possible-fβ Overwrite-iβ Prompt before overwrite-nβ Don't overwrite-l,-sβ Create (sym)links-Tβ Refuse to copy ifDESTis a directory-t DIRβ Copy allSOURCEs intoDIR-uβ Copy only newer files
cpio
cpio [-dmvu] [-F FILE] [-R USER[:GRP]] [-H newc] [-tio] [-p DIR]
[EXTR_FILE]...
Extract (-i) or list (-t) files from a cpio archive, or take a file list from stdin and create an archive (-o) or copy files (-p).
Main operation mode:
-tβ List-iβ ExtractEXTR_FILEs (or all)-oβ Create (requires-H newc)-p DIRβ Copy files toDIR
Options:
-H newcβ Archive format-dβ Make leading directories-mβ Restore mtime-vβ Verbose-uβ Overwrite-F FILEβ Input (-t,-i,-p) or output (-o) file-R USER[:GRP]β Set owner of created files-Lβ Dereference symlinks-0β NUL terminated input--ignore-devno--renumber-inodes
crc32
crc32 FILE...
Calculate CRC32 checksum of FILEs.
cut
cut [OPTIONS] [FILE]...
Print selected fields from FILEs to stdout.
-b LISTβ Output only bytes fromLIST-c LISTβ Output only characters fromLIST-d SEPβ Field delimiter for input (default-fTAB,-Frun of whitespace)-O SEPβ Field delimiter for output (default =-dfor-f, one space for-F)-Dβ Don't sort/collate sections or match-fFlines without delimiter-f LISTβ Print only these fields (-dis single char)-F LISTβ Print only these fields (-dis regex)-sβ Output only lines containing delimiter-nβ Ignored
date
date [OPTIONS] [+FMT] [[-s] TIME]
Display time (using +FMT), or set time.
-uβ Work in UTC (don't convert to local time)[-s] TIMEβ Set time toTIME-d TIMEβ DisplayTIME, notnow-D FMTβFMT(strptime format) for-s/-dTIMEconversion-r FILEβ Display last modification time ofFILE-Rβ Output RFC-2822 date-I[SPEC]β Output ISO-8601 dateSPEC=date(default),hours,minutes,secondsorns
Recognized TIME formats:
@seconds_since_1970
hh:mm[:ss]
[YYYY.]MM.DD-hh:mm[:ss]
YYYY-MM-DD hh:mm[:ss]
[[[[[YY]YY]MM]DD]hh]mm[.ss]
'date TIME' form accepts MMDDhhmm[[YY]YY][.ss] instead
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|count_bytes|fullblock|direct]
[oflag=seek_bytes|append|direct]
Copy a file with converting and formatting.
okay bestie, we are still deep in dd's option menu and it is giving build-your-own-copy-ritual π
if=FILEβ read fromFILEinstead of stdinof=FILEβ write toFILEinstead of stdoutbs=Nβ read and writeNbytes at a timeibs=Nβ readNbytes at a timeobs=Nβ writeNbytes at a timecount=Nβ copy onlyNinput blocksskip=Nβ skipNinput blocksseek=Nβ skipNoutput blocksconv=notruncβ don't truncate output fileconv=noerrorβ continue after read errorsconv=syncβ pad blocks with zerosconv=fsyncβ physically write data out before finishingconv=swabβ swap every pair of bytesiflag=skip_bytesβskip=Nis in bytesiflag=count_bytesβcount=Nis in bytesoflag=seek_bytesβseek=Nis in bytesiflag=directβO_DIRECTinputoflag=directβO_DIRECToutputiflag=fullblockβ read full blocksoflag=appendβ open output in append modestatus=noxferβ suppress rate outputstatus=noneβ suppress all output
and bestie, N may be suffixed by c (1), w (2), b (512), kB (1000), k (1024), MB, M, GB, G β iconic little unit menu π
depmod β¨
depmod [-n] [-b BASE] [VERSION] [MODFILES]...
Generate modules.dep, alias, and symbols files β literal module-dependency lore.
-b BASEβ useBASE/lib/modules/VERSION-nβ dry run: print files to stdout
df πΈ
df [-PkmhTai] [-B SIZE] [-t TYPE] [FILESYSTEM]...
Print filesystem usage statistics β the βwhere did my disk space goβ check.
-Pβ POSIX output format-kβ 1024-byte blocks (default)-mβ 1M-byte blocks-hβ human readable (e.g.1K 243M 2G)-Tβ print filesystem type-t TYPEβ print only mounts of this type-aβ show all filesystems-iβ inodes-B SIZEβ blocksize
dirname π¦
dirname FILENAME
Strip non-directory suffix from FILENAME β the pathβs last-slash era ends here.
dmesg π
dmesg [-cr] [-n LEVEL] [-s SIZE]
Print or control the kernel ring buffer β kernel gossip, basically.
-cβ clear ring buffer after printing-n LEVELβ set console logging level-s SIZEβ buffer size-rβ print raw message buffer
du π
du [-aHLdclsxhmk] [FILE]...
Summarize disk space used for FILEs (or directories).
-aβ show file sizes too-bβ apparent size (including holes)-Lβ follow all symlinks-Hβ follow symlinks on command line-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 unit is 512 bytes.
echo π«Ά
echo [-neE] [ARG]...
Print ARGs to stdout.
-nβ no trailing newline-eβ interpret backslash escapes (\t=tabetc)-Eβ don't interpret backslash escapes (default)
eject πΏ
eject [-t] [-T] [DEVICE]
Eject DEVICE or default /dev/cdrom β goodbye, lil disc.
-sβ SCSI device-tβ close tray-Tβ open/close tray (toggle)
env π
env [-i0] [-u NAME]... [-] [NAME=VALUE]... [PROG ARGS]
Print current environment or run PROG after setting up environment.
-,-iβ start with empty environment-0β NUL terminated output-u NAMEβ remove variable from environment
expr π₯
expr EXPRESSION
Print the value of EXPRESSION.
EXPRESSION may be:
ARG1 | ARG2βARG1if it is neither null nor 0, otherwiseARG2ARG1 & ARG2βARG1if neither argument is null or 0, otherwise 0ARG1 < ARG2β 1 ifARG1is less thanARG2, else 0. Similarly:ARG1 <= ARG2ARG1 = ARG2ARG1 != ARG2ARG1 >= ARG2ARG1 > ARG2
ARG1 + ARG2β sum ofARG1andARG2. Similarly:ARG1 - ARG2ARG1 * ARG2ARG1 / ARG2ARG1 % ARG2
STRING : REGEXPβ anchored pattern match ofREGEXPinSTRINGmatch STRING REGEXPβ same asSTRING : REGEXPsubstr STRING POS LENβ substring ofSTRING,POScounts from 1index STRING CHARSβ index inSTRINGwhere anyCHARSis found, or 0length STRINGβ length ofSTRINGquote TOKENβ interpretTOKENas a string, even if it is a keyword like'match'or an operator like'/'(EXPRESSION)β value ofEXPRESSION
β οΈ caveat time, bestie: beware that many operators need to be escaped or quoted for shells. Comparisons are arithmetic if bothARGs 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.
fbset π
fbset [OPTIONS] [MODE]
Show and modify frame buffer settings.
fdisk π§
fdisk [-ul] [-C CYLINDERS] [-H HEADS] [-S SECTORS] [-b SSZ] DISK
Change partition table.
-uβ start and end are in sectors (instead of cylinders)-lβ show partition table for eachDISK, then exit-b 2048β (for certain MO disks) use 2048-byte sectors-C CYLINDERSβ set number of cylinders/heads/sectors-H HEADSβ typically 255-S SECTORSβ typically 63
fgconsole β
fgconsole
Get active console.
ftpget π¦
ftpget [OPTIONS] HOST [LOCAL_FILE] REMOTE_FILE
Download a file via FTP.
-cβ continue previous transfer-vβ verbose-u USERβ username-p PASSβ password-P PORTβ thePORTvalue goes here
gunzip π«§
gunzip [-cfkt] [FILE]...
Decompress FILEs (or stdin).
-cβ write to stdout-fβ force-kβ keep input files-tβ test integrity
gzip β¨
gzip [-cfkdt] [FILE]...
Compress FILEs (or stdin).
-dβ decompress-cβ write to stdout-fβ force-kβ keep input files-tβ test integrity
halt π
halt [-d DELAY] [-nf]
Halt the system.
-d SECβ delay interval-nβ do not sync-fβ force (don't go through init)
head π
head [OPTIONS] [FILE]...
Print first 10 lines of FILEs (or stdin). With more than one FILE, precede each with a filename header.
-n N[bkm]β print firstNlines-n -N[bkm]β print all exceptNlast lines-c [-]N[bkm]β print firstNbytes (b:*512 k:*1024 m:*1024^2)-qβ never print headers-vβ always print headers
i2ctransfer πΈ
i2ctransfer [-fay] I2CBUS { rLENGTH[@ADDR] | wLENGTH[@ADDR] DATA...}...
Read/write I2C data in one transfer.
-fβ force access to busy addresses-aβ force access to non-regular addresses-yβ disable interactive mode
insmod π§©
insmod FILE [SYMBOL=VALUE]...
Load kernel module.
ip π
ip [OPTIONS] address|route|link [ARGS]
OPTIONS := -f[amily] inet|inet6|link | -o[neline]
ip addr add|del IFADDR dev IFACE | show|flush [dev IFACE] [to
PREFIX] ip route list|flush|add|del|change|append|replace|test ROUTE
ip link set IFACE [up|down] [arp on|off] [multicast on|off]
[promisc on|off] [mtu NUM] [name NAME] [qlen NUM] [address MAC]
[master IFACE | nomaster] [netns PID]
This one is a whole main-character vibe: address, route, link, and args.
ipaddr π
ipaddr add|del IFADDR dev IFACE | show|flush [dev IFACE] [to PREFIX]
ipaddr add|change|replace|delete dev IFACE [CONFFLAG-LIST] IFADDR
IFADDR := PREFIX | ADDR peer PREFIX [broadcast ADDR|+|-]
[anycast ADDR] [label STRING] [scope SCOPE] PREFIX :=
ADDR[/MASK] SCOPE := [host|link|global|NUMBER] CONFFLAG-
LIST := [CONFFLAG-LIST] CONFFLAG CONFFLAG := [noprefixroute]
ipaddr show|flush [dev IFACE] [scope SCOPE] [to PREFIX] [label
PATTERN]
The address-specific branch of ip β yes, it has lore.
iplink π
iplink set IFACE [up|down] [arp on|off] [multicast on|off]
[promisc on|off] [mtu NUM] [name NAME] [qlen NUM] [address MAC]
[master IFACE | nomaster] [netns PID] iplink add [link IFACE]
IFACE [address MAC] type TYPE [ARGS] iplink delete IFACE type TYPE
[ARGS] TYPE ARGS := vlan VLANARGS | vrf table NUM VLANARGS
:= id VLANID [protocol 802.1q|802.1ad] [reorder_hdr on|off]
[gvrp on|off] [mvrp on|off] [loose_binding on|off] iplink
show [IFACE]
Link-layer branch, with vlan and vrf table NUM details.
iproute π£οΈ
iproute list|flush|add|del|change|append|replace|test ROUTE
iproute list|flush SELECTOR SELECTOR := [root PREFIX] [match
PREFIX] [proto RTPROTO] PREFIX := default|ADDR[/MASK] iproute
get ADDR [from ADDR iif IFACE] [oif IFACE] [tos TOS] iproute
add|del|change|append|replace|test ROUTE ROUTE := NODE_SPEC
[INFO_SPEC] NODE_SPEC := PREFIX [proto RTPROTO] [scope SCOPE]
[metric METRIC] INFO_SPEC := NH OPTIONS NH := [via
[inet|inet6] ADDR] [dev IFACE] [src ADDR] [onlink] OPTIONS :=
[mtu [lock] NUM] [advmss [lock] NUM]
Route table branch, selector specs and NH/OPTIONS included.
kill πͺ
kill [-l] [-SIG] PID...
Send a signal (default: TERM) to given PIDs.
-lβ list all signal names and numbers
killall π₯
killall [-lq] [-SIG] PROCESS_NAME...
Send a signal (default: TERM) to given processes.
-lβ list all signal names and numbers-qβ don't complain if no processes were killed
killall5 πͺοΈ
killall5 [-l] [-SIG] [-o PID]...
Send a signal (default: TERM) to all processes outside current session.
-lβ list all signal names and numbers-o PIDβ don't signal thisPID
ln π
ln [-sfnbtv] [-S SUF] TARGET... LINK|DIR
Create a link LINK or DIR/TARGET to the specified TARGET(s).
-sβ make symlinks instead of hardlinks, cute lil shortcuts π«-fβ remove existing destinations, no mercy-nβ don't dereference symlinks β treat like a normal file, leave the link alone-bβ make a backup of the target (if it exists) before the link operation, so you can always undo it π«Ά-S SUFβ use SUF as the suffix instead of~when making backup files-Tβ treat LINK as a file, not a DIR-vβ verbose, tell me everything π¬
π ls
ls [-1AaCxdLHRFplinshctu] [-w WIDTH] [FILE]...
List directory contents β the moment of truth, bestie π
-1β one column output-aβ include names starting with.(yes, the hidden ones, the secrets)-Aβ like-a, but exclude.and..-xβ list by lines-dβ list directory names, not contents-Lβ follow symlinks-Hβ follow symlinks on command line-Rβ recurse, go all the way down π-pβ append/to directory names-Fβ append indicator (one of*/=@|) to names-lβ long format, the classic-iβ list inode numbers-nβ list numeric UIDs and GIDs instead of names-sβ list allocated blocks-lcβ list ctime-luβ list atime--full-timeβ list full date/time-hβ human readable sizes (1K 243M 2G) β because1048576is not it π-tβ sort by mtime-tcβ sort by ctime-tuβ sort by atime-rβ reverse sort order-w Nβ format N columns wide
π§© lsmod
lsmod
List loaded kernel modules. That's it, that's the whole vibe β¨
ποΈ lzcat
lzcat [FILE]...
Decompress to stdout β right into your terminal's DMs π¨
π md5sum
md5sum [-c[sw]] [FILE]...
Print or check MD5 checksums
-cβ check sums against the list in FILEs-sβ don't output anything, the status code shows success (silent but deadly π)-wβ warn about improperly formatted checksum lines
πΈ mdev
mdev [-vS] { [-s] | [-df] }
-vβ verbose-Sβ log to syslog too-sβ scan/sysand populate/dev-dβ daemon, listen on netlink-fβ run in foreground
Bare mdev is a kernel hotplug helper. To activate it:
echo /sbin/mdev >/proc/sys/kernel/hotplug
It uses /etc/mdev.conf with lines
[-][ENV=regex;]...DEVNAME UID:GID PERM [>|=PATH]|[!] [@|$|*PROG]
where DEVNAME is a device name regex, @major,minor[-minor2], or an environment variable regex. A common use of the latter is to load modules for hotplugged devices:
$MODALIAS=.* 0:0 660 @modprobe "$MODALIAS"
If /dev/mdev.seq file exists, mdev will wait for its value to match the $SEQNUM variable. This prevents plug/unplug races. To activate this feature, create an empty /dev/mdev.seq at boot. π
If /dev/mdev.log file exists, the debug log will be appended to it.
π mkdir
mkdir [-m MODE] [-p] DIRECTORY...
Create DIRECTORY
-m MODEβ mode-pβ no error if it exists; make parent directories as needed (iconic founder behaviour π
π§ mknod
mknod [-m MODE] NAME TYPE [MAJOR MINOR]
Create a special file (block, character, or pipe)
-m MODEβ creation mode (defaulta=rw)
TYPE:
bβ block devicecoruβ character devicepβ named pipe (MAJOR MINOR must be omitted)
π modinfo
modinfo [-adlpn0] [-F keyword] MODULE
-aβ shortcut for-F author-dβ shortcut for-F description-lβ shortcut for-F license-pβ shortcut for-F parm-F keywordβ keyword to look for-0β NUL terminated output
π§ modprobe
modprobe [-alrqvsDb] MODULE [SYMBOL=VALUE]...
-aβ load multiple MODULEs-lβ list (MODULE is a pattern)-rβ remove MODULE (stacks) or do autoclean-qβ quiet π€«-vβ verbose-sβ log to syslog-Dβ show dependencies-bβ apply blacklist to module names too
πΎ mount
mount [OPTIONS] [-o OPT] DEVICE NODE
Mount a filesystem. Filesystem autodetection requires /proc. ποΈ
-aβ mount all filesystems in fstab-fβ dry run-vβ verbose-rβ read-only mount-t FSTYPE[,...]β filesystem type(s)-T FILEβ read FILE instead of/etc/fstab-O OPTβ mount only filesystems with option OPT (-aonly)
-o OPT:
[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 time[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]ableto be bind mounted[r]bindβ bind a file or directory[recursively]to another locationmoveβ relocate an existing mount pointremountβ remount a mounted filesystem, changing flagsroβ same as-r
There are filesystem-specific -o flags. π«‘
π mv
mv [-finT] SOURCE DEST
or:
mv [-fin] SOURCE... { -t DIRECTORY | DIRECTORY }
Rename SOURCE to DEST, or move SOURCEs to DIRECTORY
-fβ don't prompt before overwriting-iβ interactive, prompt before overwrite-nβ don't overwrite an existing file-Tβ refuse to move if DEST is a directory-t DIRβ move all SOURCEs into DIR
π‘ ping
ping HOST
Send ICMP ECHO_REQUESTs to HOST. Are you there bestie?? π
π‘ ping6
ping6 HOST
Send ICMP ECHO_REQUESTs to HOST β same energy, v6 edition π
π poweroff
poweroff [-d DELAY] [-nf]
Halt and shut off power
-d SECβ delay interval-nβ do not sync-fβ force (don't go through init)
π ps
ps [-o COL1,COL2=HEADER] [-T]
Show list of processes
-o COL1,COL2=HEADERβ select columns for display-Tβ show threads
π pwd
pwd
Print the full filename of the current working directory. Where am I?? π
π reboot
reboot [-d DELAY] [-nf]
Reboot the system
-d SECβ delay interval-nβ do not sync-fβ force (don't go through init)
π₯οΈ reset
reset
Reset the screen. Ctrl+J, reset, enter β the holy trinity of "my terminal is cooked" π
ποΈ rm
rm [-irf] FILE...
Remove (unlink) FILEs
-iβ always prompt before removing-fβ never prompt-R,-rβ recurse
π rmdir
rmdir [-p] DIRECTORY...
Remove DIRECTORY if it is empty
-pβ include parents--ignore-fail-on-non-empty
π€ rmmod
rmmod [-wfa] [MODULE]...
Unload kernel modules
-wβ wait until the module is no longer used-fβ force unload-aβ remove all unused modules (recursively)
π run-parts
run-parts [-a ARG]... [-u UMASK] [--reverse] [--test] [--exit-on-error] DIRECTORY
Run a bunch of scripts in DIRECTORY
-a ARGβ pass ARG as an argument to scripts-u UMASKβ set UMASK before running scripts--reverseβ reverse execution order--testβ dry run--exit-on-errorβ exit if a script exits with non-zero
β¨οΈ setkeycodes
setkeycodes { SCANCODE KEYCODE }...
Modify the kernel's scancode-to-keycode map, allowing unusual keyboards to generate usable keycodes. Your weird keyboard deserves love too π«Ά
SCANCODE is either xx or e0xx (hexadecimal), KEYCODE is decimal.
π sh
sh [-il] [-|+Cabefmnuvx] [-|+o OPT]... [-c 'SCRIPT' [ARG0 ARGS] | FILE ARGS | -s ARGS]
Unix shell interpreter. The main character of the whole OS π
π sha1sum
sha1sum [-c[sw]] [FILE]...
Print or check SHA1 checksums
-cβ check sums against the list in FILEs-sβ don't output anything, the status code shows success-wβ warn about improperly formatted checksum lines
π sha256sum
sha256sum [-c[sw]] [FILE]...
Print or check SHA256 checksums
-cβ check sums against the list in FILEs-sβ don't output anything, the status code shows success-wβ warn about improperly formatted checksum lines
π sha3sum
sha3sum [-c[sw]] [-a BITS] [FILE]...
Print or check SHA3 checksums
-cβ check sums against the list in FILEs-sβ don't output anything, the status code shows success-wβ warn about improperly formatted checksum lines-a BITSβ224(default),256,384,512
π sha512sum
sha512sum [-c[sw]] [FILE]...
Print or check SHA512 checksums
-cβ check sums against the list in FILEs-sβ don't output anything, the status code shows success-wβ warn about improperly formatted checksum lines
π² shuf
shuf [-n NUM] [-o FILE] [-z] [FILE | -e [ARG...] | -i L-H]
Randomly permute lines β chaos, but make it organized β¨
-n NUMβ output at most NUM lines-o FILEβ write to FILE, not standard output-zβ NUL terminated output-eβ treat ARGs as lines-i L-Hβ treat numbers L-H as lines
π΄ 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. Me when someone says "five more minutes" π
π swapoff
swapoff [-a] [DEVICE]
Stop swapping on DEVICE
-aβ stop swapping on all swap devices
π swapon
swapon [-a] [-e] [-d[POL]] [DEVICE]
Start swapping on DEVICE
-aβ start swapping on all swap devices-d[POL]β discard blocks at swapon (POL=once), as freed (POL=pages), or both (POLomitted)-eβ silently skip devices that do not exist
π½ sync
sync
Write all buffered blocks to disk. Flush it, bestie π½β¨
π tail
tail [OPTIONS] [FILE]...
...it prints the last 10 lines of FILEs (or stdin) π and when you hand it more than one FILE, it puts a filename header in front of each one so you actually know which is which.
-c [+]N[bkm]β print the last N bytes-n N[bkm]β print the last N lines-n +N[bkm]β start on the *N*th line and print the rest-qβ never print headers-vβ always print headers-fβ print data as the file grows-Fβ same as-f, but keep retrying-s SECONDSβ wait SECONDS between reads while using-f
the size suffix tea π΅: b:*512 k:*1024 m:*1024^2 β iykyk, that's bytes/kilos/megas with the multipliers to match.
ποΈ tar
tar tar c|x|t [-ZzJjahmvokO] [-f TARFILE] [-C DIR] [-T FILE] [-X FILE]
[LONGOPT]... [FILE]...
Create, extract, or list files out of a tar file π
cβ createxβ extracttβ list-f FILEβ name of TARFILE ('-'means stdin/out, iconic)-C DIRβ change to DIR before the operation-vβ verbose-Oβ extract to stdout-mβ don't restore mtime-oβ don't restore user:group-kβ don't replace files that already exist-Zβ (de)compress usingcompress-zβ (de)compress usinggzip-Jβ (de)compress usingxz-jβ (de)compress usingbzip2--lzmaβ (de)compress usinglzma-aβ (de)compress based on extension-hβ follow symlinks-T FILEβ file with names to include-X FILEβ file with glob patterns to exclude--exclude PATTERNβ glob pattern to exclude--overwriteβ replace existing files--strip-components NUMβ strip NUM leading components--no-recursionβ don't descend into directories--numeric-ownerβ use numeric user:group--no-same-permissionsβ don't restore access permissions--to-command COMMANDβ pipe files to COMMAND
π« tee
tee tee [-ai] [FILE]...
Copies stdin into each FILE, and also to stdout (both, bestie, it does both β¨)
-aβ append to the given *FILE*s instead of overwriting-iβ ignore interrupt signals (SIGINT)
βοΈ truncate
truncate [-c] -s SIZE FILE...
Truncates FILEs down to SIZE
-cβ do not create files-s SIZEβ the size, obviously π
β° ts
ts [-is] [STRFTIME]
Pipes stdin to stdout and stamps a timestamp onto every single line π°οΈ
-sβ time since start-iβ time since the previous line
π΄ umount
umount [-rlfa] [-t FSTYPE] FILESYSTEM|DIRECTORY
Unmounts filesystems, no cap
-aβ unmount all filesystems-rβ remount devices read-only if the mount is busy-lβ lazy umount (detach the filesystem)-fβ force umount (i.e., for an unreachable NFS server)-t FSTYPE[,...]β unmount only these filesystem type(s)
π₯οΈ uname
uname [-amnrspvio]
Prints system information, the classic "who even am I" applet π¦
-aβ print all-mβ machine (hardware) type-nβ hostname-rβ kernel release-sβ kernel name (this one's the default)-pβ processor type-vβ kernel version-iβ hardware platform-oβ OS name
π unlink
unlink FILE
Deletes FILE by calling unlink() β yes that's the whole applet, she's minimal π
ποΈ unlzma
unlzma [-cfk] [FILE]...
Decompresses *FILE*s (or stdin)
-cβ write to stdout-fβ force-kβ keep input files-tβ test integrity
ποΈ unxz
unxz [-cfk] [FILE]...
Decompresses *FILE*s (or stdin), same energy as her lzma sister β¨
-cβ write to stdout-fβ force-kβ keep input files-tβ test integrity
π unzip
unzip [-lnojpq] FILE[.zip] [FILE]... [-x FILE]... [-d DIR]
Extracts *FILE*s out of a ZIP archive π
-lβ list contents (with-qfor the short form)-nβ never overwrite files (default is: ask)-oβ overwrite-jβ do not restore paths-pβ write to stdout-tβ test-qβ quiet-x FILEβ exclude *FILE*s-d DIRβ extract into DIR
π xzcat
xzcat [FILE]...
Decompresses to stdout, that's it, that's the vibe
β yes
yes [STRING]
Repeatedly prints a line with STRING, or 'y' if you don't give one β infinite agreement, main character energy fr fr
π± zcat
zcat [FILE]...
Decompresses to stdout π
π§ LIBC NSS β¨
Okay so this bit is a whole thing, listen π«Ά GNU Libc (glibc) uses the Name Service Switch (NSS) to configure how the C library behaves for the local environment, and to configure how it reads system data β stuff like passwords and group information. It's implemented with an /etc/nsswitch.conf configuration file plus one or more of the /lib/libnss_* libraries. BusyBox tries to avoid using any libc calls that go through NSS, but some applets β login and su, looking at you π β will use libc functions that need NSS.
If you enable CONFIG_USE_BB_PWD_GRP, BusyBox uses internal functions to directly access the /etc/passwd, /etc/group, and /etc/shadow files without touching NSS. Which may legitimately let you run your system without installing any of the NSS configuration files and libraries. Slay.
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. On top of making your system significantly smaller, uClibc does not require the use of any NSS support files or libraries. Obsessed.
π MAINTAINER
Denis Vlasenko <vda.linux@googlemail.com>
π 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've done needs more detail, or is just incorrect, please send in an update.
- Emanuele Aina
<emanuele.aina@tiscali.it>βrun-parts - Erik Andersen
<andersen@codepoet.org>β tons of new stuff, a major rewrite of most of the core apps, tons of new apps as noted in header files, plus lots of tedious effort writing these boring docs that nobody is actually going to read π - Laurence Anderson
<l.d.anderson@warwick.ac.uk>βrpm2cpio,unzip,get_header_cpio,read_gzinterface,rpm - Jeff Angielski
<jeff@theptrgroup.com>βftpput,ftpget - Edward Betts
<edward@debian.org>βexpr,hostid,logname,whoami - John Beppu
<beppu@codepoet.org>βdu,nslookup,sort - Brian Candler
<B.Candler@pobox.com>βtiny-ls(ls) - Randolph Chung
<tausq@debian.org>βfbset,ping,hostname - Dave Cinege
<dcinege@psychosis.com>βmore(v2),makedevs,dutmp, modularization, auto links file, various fixes, Linux Router Project maintenance - Jordan Crouse
<jordan@cosmicpenguin.net>βipcalc - Magnus Damm
<damm@opensource.se>βtftpclient,insmodpowerpc support - Larry Doolittle
<ldoolitt@recycle.lbl.gov>β pristine source directory compilation, lots of patches and fixes - Glenn Engel
<glenne@engel.org>βhttpd - Gennady Feldman
<gfeldman@gena01.com>β Sysklogd (single threadedsyslogd, IPC Circular buffer support,logread), various fixes - Karl M. Hegbloom
<karlheg@debian.org>βcp_mv.c, the test suite, various fixes toutility.c, &c. - Daniel Jacobowitz
<dan@debian.org>βmktemp.c - Matt Kraai
<kraai@alumni.cmu.edu>β documentation, bugfixes, test suite - Stephan Linz
<linz@li-pro.net>βipcalc, Red Hat equivalence - John Lombardo
<john@deltanet.com>βtr - Glenn McGrath
<bug1@iinet.net.au>β common unarchiving code and unarchiving applets,ifupdown,ftpgetput,nameif,sed,patch,fold,install,uudecode, plus various bugfixes, review and apply numerous patches - 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 triviallibbbroutines β also bug fixes, partial rewrites, and size optimizations inash,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 - 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 π - Bruce Perens
<bruce@pixar.com>β original author of BusyBox in 1995, 1996. Some of his code can still be found hiding here and there... - Tim Riker
<Tim@Rikers.org>β bug fixes, member of fan club π«Ά - Kent Robotti
<robotti@metconnect.com>βreset, tons and tons of bug reports and patches - Chip Rosenthal
<chip@unicom.com>,<crosenth@covad.com>βwgetβ contributed by permission of Covad Communications - Pavel Roskin
<proski@gnu.org>β lots of bugs fixes and patches - Gyepi Sam
<gyepi@praxis-sw.com>β remote logging feature forsyslogd - Linus Torvalds
<torvalds@transmeta.com>βmkswap,fsck.minix,mkfs.minix - Mark Whitley
<markw@codepoet.org>βgrep,sed,cut,xargs(previous), style-guide, new-applet-HOWTO, bug fixes, etc. - Charles P. Wright
<cpwright@villagenet.com>βgzip,mini-netcat(nc) - Enrique Zanardi
<ezanardi@ull.es>βtarcat(since removed),loadkmap, various fixes, Debian maintenance - Tito Ragusa
<farmatito@tiscali.it>βdevfsdand size optimizations instrings,openvtanddeallocvt - Paul Fox
<pgf@foxharp.boston.ma.us>β vi editing mode forash, various other patches/fixes - Roberto A. Foglietta
<me@roberto.foglietta.name>β port:dnsd - Bernhard Reutner-Fischer
<rep.dot.nop@gmail.com>β misc - Mike Frysinger
<vapier@gentoo.org>β initial e2fsprogs,printenv,setarch,sum, misc - Jie Zhang
<jie.zhang@analog.com>β fixed two bugs inmshandhush(exitcode of killed processes)
that's the whole page bestie, you made it to the end π this one's version 1.35.0, dated 2022-01-19 β go be iconic with it π β¨
π¦ where this page comes from
- epel 9: busybox-petitboot 1:1.35.0-2.el9 Β· GPLv2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms