{"id":3612,"date":"2023-04-26T09:25:21","date_gmt":"2023-04-26T13:25:21","guid":{"rendered":"https:\/\/dft.wiki\/?p=3612"},"modified":"2025-04-11T19:12:13","modified_gmt":"2025-04-11T23:12:13","slug":"what-is-and-how-to-use-busybox","status":"publish","type":"post","link":"https:\/\/dft.wiki\/?p=3612","title":{"rendered":"What is and How to Use BusyBox"},"content":{"rendered":"<p><strong>BusyBox<\/strong> is a single but multi-call binary file that contains a series of commands and tools built into it. It is particularly useful, but not limited to, on minimalistic distribution or docker image, like Alpine or in embedded devices [<a href=\"https:\/\/git.busybox.net\/busybox\/\">Link<\/a>] aka &#8220;The Swiss Army Knife of Embedded Linux&#8221;.<\/p>\n<p>It contains several (~300) versions of the most popular Linux\/UNIX commands and can be used pretty much anywhere, as long as it is built\/compiled to the platform and architecture, such as OpenWRT, Android, and managed network devices (like routers and switches).<\/p>\n<p><strong>INSTALLATION<\/strong><\/p>\n<pre>which busyboxd || sudo apt install busybox -y<\/pre>\n<p>It can also be run in a container for learning and trying out:<\/p>\n<pre>docker pull busybox\r\ndocker run busybox ls<\/pre>\n<p><strong>LIST THE AVAILABLE COMMANDS<\/strong><\/p>\n<pre>busybox\r\nbusybox --list<\/pre>\n<p>Example output &#8220;Currently defined functions&#8221; from Ubuntu 22.04:<\/p>\n<pre>[, [[, acpid, adjtimex, ar, arch, arp, arping, ash, awk, basename, bc, blkdiscard, blockdev, brctl, bunzip2, busybox, bzcat, bzip2, cal, cat, chgrp, chmod, chown, chpasswd,\r\nchroot, chvt, clear, cmp, cp, cpio, crond, crontab, cttyhack, cut, date, dc, dd, deallocvt, depmod, devmem, df, diff, dirname, dmesg, dnsdomainname, dos2unix, dpkg, dpkg-deb,\r\ndu, dumpkmap, dumpleases, echo, ed, egrep, env, expand, expr, factor, fallocate, false, fatattr, fdisk, fgrep, find, fold, free, freeramdisk, fsfreeze, fstrim, ftpget, ftpput,\r\ngetopt, getty, grep, groups, gunzip, gzip, halt, head, hexdump, hostid, hostname, httpd, hwclock, i2cdetect, i2cdump, i2cget, i2cset, id, ifconfig, ifdown, ifup, init, insmod,\r\nionice, ip, ipcalc, ipneigh, kill, killall, klogd, last, less, link, linux32, linux64, linuxrc, ln, loadfont, loadkmap, logger, login, logname, logread, losetup, ls, lsmod,\r\nlsscsi, lzcat, lzma, lzop, md5sum, mdev, microcom, mkdir, mkdosfs, mke2fs, mkfifo, mknod, mkpasswd, mkswap, mktemp, modinfo, modprobe, more, mount, mt, mv, nameif, nc, netstat,\r\nnl, nologin, nproc, nsenter, nslookup, nuke, od, openvt, partprobe, passwd, paste, patch, pidof, ping, ping6, pivot_root, poweroff, printf, ps, pwd, rdate, readlink, realpath,\r\nreboot, renice, reset, resume, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-init, run-parts, sed, seq, setkeycodes, setpriv, setsid, sh, sha1sum, sha256sum, sha512sum,\r\nshred, shuf, sleep, sort, ssl_client, start-stop-daemon, stat, static-sh, strings, stty, su, sulogin, svc, svok, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail,\r\ntar, taskset, tc, tee, telnet, telnetd, test, tftp, time, timeout, top, touch, tr, traceroute, traceroute6, true, truncate, tty, tunctl, ubirename, udhcpc, udhcpd, uevent,\r\numount, uname, uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unshare, unxz, unzip, uptime, usleep, uudecode, uuencode, vconfig, vi, w, watch, watchdog, wc, wget, which,\r\nwho, whoami, xargs, xxd, xz, xzcat, yes, zcat<\/pre>\n<p><strong>WHAT DOES IT MEANS<\/strong><\/p>\n<p>Probably, if not provided by any other source, BusyBox is providing all the listed features to the current system.<\/p>\n<p><strong>BONUS<\/strong><\/p>\n<p>Check out the alternative called <strong>ToyBox<\/strong>, which curiously was created by the same developer but focused on Android [<a href=\"https:\/\/github.com\/landley\/toybox\">Link<\/a>].<\/p>\n<p>Give it a try to <strong>Termux<\/strong> on Android to have a terminal emulator with Linux environment [<a href=\"https:\/\/termux.dev\/en\/\">Link<\/a>].<\/p>\n<p>Check out <strong>CoreUtils<\/strong> [<a href=\"https:\/\/www.gnu.org\/software\/coreutils\/coreutils.html\">Link<\/a>] and <strong>MoreUtils<\/strong> [<a href=\"https:\/\/build.opensuse.org\/package\/show\/utilities\/moreutils\">Link<\/a>].<\/p>\n","protected":false},"excerpt":{"rendered":"<p>BusyBox is a single but multi-call binary file that contains a series of commands and [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-3612","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/3612","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3612"}],"version-history":[{"count":6,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/3612\/revisions"}],"predecessor-version":[{"id":4782,"href":"https:\/\/dft.wiki\/index.php?rest_route=\/wp\/v2\/posts\/3612\/revisions\/4782"}],"wp:attachment":[{"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3612"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3612"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/dft.wiki\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3612"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}