busybox

What is BusyBox?

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 bzip2, coreutils, dhcp, diffutils, e2fsprogs, file, findutils, gawk, grep, inetutils, less, modutils, net-tools, procps, sed, shadow, sysklogd, sysvinit, tar, util-linux, and vim. The utilities in BusyBox often have fewer options than their full-featured cousins; however, the options that are included provide the expected functionality and behave very much like their larger counterparts.

BusyBox seems useful to

  1. read the C Implementation of the shell utilities
  2. use as sandbox as a simpler environment compared in MacOS

Implementation of shell command cat in C

https://github.com/mirror/busybox/blob/master/coreutils/cat.c

Play with busybox

docker run -it --rm busybox

/bin # ls -l | wc -l
406

There are 406 utilities in busybox /bin, whereas MacOS has 980 in /usr/bin.