BusyBox: Difference between revisions
Prabuanand (talk | contribs) (added busybox applet list with version reference) |
Prabuanand (talk | contribs) (reworded sentence and moved headings) |
||
Line 1: | Line 1: | ||
Alpine Linux is built around musl libc and [https://www.busybox.net/ busybox]. To minimize footprint, Alpine Linux comes with BusyBox by default. BusyBox provides replacements for most of the utilities usually found in GNU coreutils, util-linux, etc. Built-in utility programs called as applets share code for many common operations. | Alpine Linux is built around musl libc and [https://www.busybox.net/ busybox]. To minimize footprint, Alpine Linux comes with BusyBox by default. | ||
BusyBox provides replacements for most of the utilities usually found in GNU coreutils, util-linux, etc. Built-in utility programs called as [[#BusyBox applets|applets]] share code for many common operations. BusyBox is set up as an endpoint for numerous symlinks that substitute various utilities. The utilities in BusyBox generally have fewer options than their full-featured GNU counterparts. | |||
== BusyBox applets == | |||
The command {{ic|$ busybox}} lists the applets that have been compiled into BusyBox binary, the output of which, as of [[Release_Notes_for_Alpine_3.22.0|v3.22]], is shown below: {{Cmd|<nowiki>$ busybox | The command {{ic|$ busybox}} lists the applets that have been compiled into BusyBox binary, the output of which, as of [[Release_Notes_for_Alpine_3.22.0|v3.22]], is shown below: {{Cmd|<nowiki>$ busybox | ||
Line 35: | Line 39: | ||
To view options supported by a specific BusyBox applet, say {{ic|grep}}, issue the command {{ic|$ busybox grep -h}} | To view options supported by a specific BusyBox applet, say {{ic|grep}}, issue the command {{ic|$ busybox grep -h}} | ||
== Replacing BusyBox utilities == | |||
If you find certain utilities in busybox lacking in features or options, equivalent [[How to get regular stuff working|full-featured utilities can easily replace]] them. This may be particularly useful when intially setting up hardware like [[Sound Setup|sound]], [[Configure Networking|networking]], [[Graphics driver|graphics]] and [[Printer Setup|printers]] and can be removed once done. | |||
== Ash shell == | == Ash shell == | ||
Line 55: | Line 63: | ||
Alpine Linux comes inbuilt with a basic version of [[Power_management#Busybox acpid|acpid]] as part of BusyBox. | Alpine Linux comes inbuilt with a basic version of [[Power_management#Busybox acpid|acpid]] as part of BusyBox. | ||
== init == | == init == |
Latest revision as of 04:14, 16 October 2025
Alpine Linux is built around musl libc and busybox. To minimize footprint, Alpine Linux comes with BusyBox by default.
BusyBox provides replacements for most of the utilities usually found in GNU coreutils, util-linux, etc. Built-in utility programs called as applets share code for many common operations. BusyBox is set up as an endpoint for numerous symlinks that substitute various utilities. The utilities in BusyBox generally have fewer options than their full-featured GNU counterparts.
BusyBox applets
The command $ busybox
lists the applets that have been compiled into BusyBox binary, the output of which, as of v3.22, is shown below:
$ busybox BusyBox v1.37.0 (2025-08-05 16:40:33 UTC) multi-call binary. BusyBox is copyrighted by many authors between 1998-2015. Licensed under GPLv2. See source distribution for detailed copyright notices. Usage: busybox [function [arguments]...] or: busybox --list[-full] or: busybox --install [-s] [DIR] or: function [arguments]... BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. Most people will create a link to busybox for each function they wish to use and BusyBox will act like whatever it was invoked as. Currently defined functions: [, [[, acpid, add-shell, addgroup, adduser, adjtimex, arch, arp, arping, ash, awk, base64, basename, bbconfig, bc, beep, blkdiscard, blkid, blockdev, brctl, bunzip2, bzcat, bzip2, cal, cat, chattr, chgrp, chmod, chown, chpasswd, chroot, chvt, cksum, clear, cmp, comm, cp, cpio, crond, crontab, cryptpw, cut, date, dc, dd, deallocvt, delgroup, deluser, depmod, df, diff, dirname, dmesg, dnsdomainname, dos2unix, du, dumpkmap, echo, egrep, eject, env, ether-wake, expand, expr, factor, fallocate, false, fatattr, fbset, fbsplash, fdflush, fdisk, fgrep, find, findfs, flock, fold, free, fsck, fstrim, fsync, fuser, getopt, getty, grep, groups, gunzip, gzip, halt, hd, head, hexdump, hostid, hostname, hwclock, id, ifconfig, ifdown, ifenslave, ifup, init, inotifyd, insmod, install, ionice, iostat, ip, ipaddr, ipcalc, ipcrm, ipcs, iplink, ipneigh, iproute, iprule, iptunnel, kbd_mode, kill, killall, killall5, klogd, last, less, link, linux32, linux64, ln, loadfont, loadkmap, logger, login, logread, losetup, ls, lsattr, lsmod, lsof, lsusb, lzcat, lzma, lzop, lzopcat, makemime, md5sum, mdev, mesg, microcom, mkdir, mkdosfs, mkfifo, mkfs.vfat, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mountpoint, mpstat, mv, nameif, nanddump, nandwrite, nbd-client, nc, netstat, nice, nl, nmeter, nohup, nologin, nproc, nsenter, nslookup, ntpd, od, openvt, partprobe, passwd, paste, pgrep, pidof, ping, ping6, pipe_progress, pivot_root, pkill, pmap, poweroff, printenv, printf, ps, pscan, pstree, pwd, pwdx, raidautorun, rdate, rdev, readahead, readlink, realpath, reboot, reformime, remove-shell, renice, reset, resize, rev, rfkill, rm, rmdir, rmmod, route, run-parts, sed, sendmail, seq, setconsole, setfont, setkeycodes, setlogcons, setpriv, setserial, setsid, sh, sha1sum, sha256sum, sha3sum, sha512sum, showkey, shred, shuf, slattach, sleep, sort, split, stat, strings, stty, su, sum, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, tee, test, time, timeout, top, touch, tr, traceroute, traceroute6, tree, true, truncate, tty, ttysize, tunctl, udhcpc, udhcpc6, umount, uname, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unshare, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, vlock, volname, watch, watchdog, wc, wget, which, who, whoami, whois, xargs, xxd, xzcat, yes, zcat, zcip
To view options supported by a specific BusyBox applet, say grep
, issue the command $ busybox grep -h
Replacing BusyBox utilities
If you find certain utilities in busybox lacking in features or options, equivalent full-featured utilities can easily replace them. This may be particularly useful when intially setting up hardware like sound, networking, graphics and printers and can be removed once done.
Ash shell
Alpine Linux uses Busybox Ash shell for its default shell.
vi
Busybox uses tiny vi, a small 'vi' clone. Refer Busybox vi tutorial for an excellent introduction.
udhcpc
udhcpc is the default DHCP client that comes inbuilt with Busybox.
Cron
Busybox crond is the default cron implementation in Alpine Linux.
acpid
Alpine Linux comes inbuilt with a basic version of acpid as part of BusyBox.
init
Busybox init is the first process(pid 1) started during boot. It never exits. It executes OpenRC runlevel scripts according to entries in /etc/inittab.
Shutdown commands
The busybox command equivalent for traditional GNU/Linux systems shutdown commands are as follows:
# reboot # ⇔ shutdown now -r # halt # ⇔ shutdown now -H # poweroff # ⇔ shutdown now -P