Skip to content

toybox

  • toybox’s cpio defaults to newc, and is as fast as bsdcpio
  • Do we need to run scripts/genconfig.sh before make?
  • scripts/genconfig.sh and tests depend on bash
  • find from findutils is about twice as fast as the one from toybox
  • toybox’s ip is unable to set interfaces up
  • musl recommends using getconf (and iconv?) from toybox
  • toybox’s sysctl —system vs -p
  • sysctl.d directory is better than sysctl.conf file as you’re just dropping files in there instead of editing a file in place
  • sysctl configuration: https://github.com/k4yt3x/sysctl
  • prefer toybox’s groups to shadow’s
  • This symbol is always set: TOYBOX_UTMPX=y
  • coreutils
  • diffutils
  • findutils; toybox’s find is approximately two times slower
  • libarchive’s bsdcpio
  • patch; toybox’s patch already does --no-backup-if-mismatch by default
  • procps-ng; toybox does not provide hugetop, pidwait, slabtop (though planned) and tload (not planned)
  • psmisc; toybox is planning on providing fuser, pstree, peekfd and prtstat (but not pslog or pstree.x11)
  • sed
  • bc; toybox’s bc is at least 20 times slower for larger numbers despite being based on gavin’s implementation
  • file
  • fping
  • grep; toybox’s grep is at least 10 times slower
  • iproute2
  • kbd; busybox has better implementations
  • less; bad implementation
  • mandoc; bad implementation
  • neatvi; bad implementation
  • pciutils
  • sdhcp
  • shadow
  • util-linux; bad implementations like swapon
  • wget2; bad implementation
  1. b2sum
  2. basenc
  3. chcon (for SELinux)
  4. csplit
  5. dir
  6. dircolors (provided by ls)
  7. join
  8. numfmt
  9. pathchk
  10. pinky
  11. pr
  12. ptx
  13. stdbuf
  14. sum
  15. tsort
  16. unexpand
  17. users (provided by shadow)
  18. vdir
  • . (POSIX) (bash, dash, oksh, yash)
  • : (POSIX) (bash, dash, oksh, yash)
  • alias/unalias (bash, dash, oksh, yash)
  • bg (bash, dash, oksh, yash)
  • break (POSIX) (bash, dash, oksh, yash)
  • cd (bash, dash, oksh, yash)
  • command (bash, dash, oksh, yash)
  • continue (POSIX) (bash, dash, oksh, yash)
  • echo (bash, dash, oksh) (yash: substitutive built-in for /usr/bin/echo)
  • eval (POSIX) (bash, dash, oksh, yash)
  • exec (POSIX) (bash, dash, oksh, yash)
  • exit (POSIX) (bash, dash, oksh, yash)
  • export (POSIX) (bash, dash, oksh, yash)
  • false (bash, dash, oksh, yash)
  • fc (bash, dash, oksh, yash)
  • fg (bash, dash, oksh, yash)
  • getopts (bash, dash, oksh, yash)
  • hash (bash, dash, yash) (oksh: alias for alias -t)
  • history (bash, oksh, yash) (oksh: alias for fc -l)
  • jobs (bash, dash, oksh, yash)
  • kill (bash, dash, oksh, yash)
  • local (bash, dash, yash) (oksh: alias for typeset)
  • printf (bash, dash, oksh, yash)
  • pwd (bash, dash, oksh) (yash: substitutive built-in for /usr/bin/pwd)
  • read (bash, dash, oksh, yash)
  • readonly (POSIX) (bash, dash, oksh, yash)
  • return (POSIX) (bash, dash, oksh, yash)
  • set (POSIX) (bash, dash, oksh, yash)
  • shift (POSIX) (bash, dash, oksh, yash)
  • suspend (bash, oksh, yash)
  • test/[ (bash, dash, oksh) (yash: substitutive built-in for /usr/bin/test and /usr/bin/[ respectively)
  • times (POSIX) (bash, dash, oksh, yash)
  • trap (POSIX) (bash, dash, oksh, yash)
  • true (bash, dash, oksh, yash)
  • type (bash, dash, oksh, yash)
  • typeset (bash, oksh, yash)
  • ulimit (bash, dash, oksh, yash)
  • umask (bash, dash, oksh, yash)
  • unset (POSIX) (bash, dash, oksh, yash)
  • wait (bash, dash, oksh, yash)
  • Providing these as standalone binaries is mandated by POSIX (with the exception of help and time?)
  • Without these exec $tool (e.g. $tool is true) fails as shell builtins can not be execed into
  • [
  • echo
  • false
  • help
  • kill
  • printf
  • pwd
  • test
  • time
  • true
  • ulimit

Uncommon Builtins Not Found in Different shells

Section titled “Uncommon Builtins Not Found in Different shells”
  • abbr (bash, dash, oksh, yash)
  • alloc (bash, dash, oksh, yash)
  • autoload (bash, dash, yash) (oksh: alias for typeset -fu)
  • bindkey (bash, dash, oksh) (yash: elective builtin)
  • bye (bash, dash, oksh, yash)
  • cap (bash, dash, oksh, yash)
  • chdir (bash, oksh, yash) (dash surprisingly provides this builtin)
  • clone (bash, dash, oksh, yash)
  • comparguments (bash, dash, oksh, yash)
  • compcall (bash, dash, oksh, yash)
  • compctl (bash, dash, oksh, yash)
  • compdescribe (bash, dash, oksh, yash)
  • compfiles (bash, dash, oksh, yash)
  • compgroups (bash, dash, oksh, yash)
  • compound (bash, dash, oksh, yash)
  • compquote (bash, dash, oksh, yash)
  • comptags (bash, dash, oksh, yash)
  • comptry (bash, dash, oksh, yash)
  • compvalues (bash, dash, oksh, yash)
  • disable (bash, dash, oksh, yash)
  • dosh (bash, dash, oksh, yash)
  • dot (bash, dash, oksh, yash)
  • echotc (bash, dash, oksh, yash)
  • echoti (bash, dash, oksh, yash)
  • enum (bash, dash, oksh, yash)
  • float (bash, dash, oksh, yash)
  • foreach (bash, dash, oksh, yash)
  • hist (bash, dash, oksh, yash)
  • limit (bash, dash, oksh, yash)
  • map (bash, dash, oksh, yash)
  • nameref (bash, dash, oksh, yash)
  • notify (bash, dash, oksh, yash)
  • rehash (bash, dash, oksh, yash)
  • repeat (bash, dash, oksh, yash)
  • savehistory (bash, dash, oksh, yash)
  • setenv (bash, dash, oksh, yash)
  • stop (bash, dash, yash) (oksh: alias for kill -STOP)
  • unhash (bash, dash, oksh, yash)
  • unlimit (bash, dash, oksh, yash)
  • case (bash, dash, oksh, yash)
  • do (bash, dash, oksh, yash)
  • done (bash, dash, oksh, yash)
  • elif (bash, dash, oksh, yash)
  • else (bash, dash, oksh, yash)
  • esac (bash, dash, oksh, yash)
  • fi (bash, dash, oksh, yash)
  • for (bash, dash, oksh, yash)
  • function (bash, oksh, yash)
  • if (bash, dash, oksh, yash)
  • in (bash, dash, oksh, yash)
  • select (bash, oksh)
  • then (bash, dash, oksh, yash)
  • time (bash, oksh)
  • until (bash, dash, oksh, yash)
  • while (bash, dash, oksh, yash)
  • caller
  • compgen
  • declare
  • enable
  • logout
  • mapfile
  • readarray
  • shopt
  • source
  • integer (alias for typeset -i)
  • print
  • whence
  • bind (bash, oksh)
  • builtin (bash, oksh)
  • complete (bash, yash)
  • dirs (bash, yash)
  • disown (bash, yash)
  • help (bash, yash)
  • let (bash, oksh)
  • popd (bash, yash)
  • pushd (bash, yash)