toybox
toybox’scpiodefaults tonewc, and is as fast asbsdcpio- Do we need to run
scripts/genconfig.shbeforemake? scripts/genconfig.shand tests depend onbashfindfromfindutilsis about twice as fast as the one fromtoyboxtoybox’sipis unable to set interfaces upmuslrecommends usinggetconf(andiconv?) fromtoyboxtoybox’ssysctl —systemvs-psysctl.ddirectory is better thansysctl.conffile as you’re just dropping files in there instead of editing a file in placesysctlconfiguration: https://github.com/k4yt3x/sysctl- prefer
toybox’sgroupstoshadow’s - This symbol is always set:
TOYBOX_UTMPX=y
Replaces
Section titled “Replaces”coreutilsdiffutilsfindutils;toybox’sfindis approximately two times slowerlibarchive’sbsdcpiopatch;toybox’spatchalready does--no-backup-if-mismatchby defaultprocps-ng;toyboxdoes not providehugetop,pidwait,slabtop(though planned) andtload(not planned)psmisc;toyboxis planning on providingfuser,pstree,peekfdandprtstat(but notpslogorpstree.x11)sed
Does Not Replace
Section titled “Does Not Replace”bc; toybox’sbcis at least 20 times slower for larger numbers despite being based on gavin’s implementationfilefpinggrep; toybox’sgrepis at least 10 times sloweriproute2kbd; busybox has better implementationsless; bad implementationmandoc; bad implementationneatvi; bad implementationpciutilssdhcpshadowutil-linux; bad implementations likeswaponwget2; bad implementation
Additional binaries provided by coreutils
Section titled “Additional binaries provided by coreutils”b2sumbasencchcon(for SELinux)csplitdirdircolors(provided byls)joinnumfmtpathchkpinkyprptxstdbufsumtsortunexpandusers(provided byshadow)vdir
Shell Builtins
Section titled “Shell Builtins”.(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 foralias -t)history(bash, oksh, yash) (oksh: alias forfc -l)jobs(bash, dash, oksh, yash)kill(bash, dash, oksh, yash)local(bash, dash, yash) (oksh: alias fortypeset)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/testand/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)
Shell Builtins Provided by toybox
Section titled “Shell Builtins Provided by toybox”- Providing these as standalone binaries is mandated by POSIX (with the exception of
helpandtime?) - Without these
exec $tool(e.g.$toolistrue) fails as shell builtins can not beexeced into [echofalsehelpkillprintfpwdtesttimetrueulimit
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 fortypeset -fu)bindkey(bash, dash, oksh) (yash: elective builtin)bye(bash, dash, oksh, yash)cap(bash, dash, oksh, yash)chdir(bash, oksh, yash) (dashsurprisingly 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 forkill -STOP)unhash(bash, dash, oksh, yash)unlimit(bash, dash, oksh, yash)
Shell Keywords
Section titled “Shell Keywords”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)
Bashisms Builtins
Section titled “Bashisms Builtins”callercompgendeclareenablelogoutmapfilereadarrayshoptsource
Okshisms Builtins
Section titled “Okshisms Builtins”integer(alias fortypeset -i)printwhence
Custom Builtins
Section titled “Custom Builtins”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)
References
Section titled “References”- https://android.googlesource.com/platform/system/core/+/master/shell_and_utilities/README.md
- https://codeberg.org/sewn/kiss-repo/commit/c7449c660d048034b3da358efe0a4d8526c8019b
- https://core.suckless.org/sbase/
- https://core.suckless.org/ubase/
- https://github.com/chimera-linux/chimerautils
- https://github.com/dcantrell/bsdutils
- https://github.com/evilusean/Pysean/blob/main/NoBloatTools
- https://github.com/ibara/baseutils
- https://github.com/matijaskala/coreutils-bsd
- https://github.com/oracle/solaris-userland
- https://heirloom-ng.pindorama.net.br
- https://heirloom.sourceforge.net/devtools.html
- https://heirloom.sourceforge.net/sh.html
- https://heirloom.sourceforge.net/tools.html
- https://landley.net/toybox/index.html
- https://landley.net/toybox/roadmap.html
- https://landley.net/toybox/status.html
- https://packages.gentoo.org/categories/app-alternatives
- https://tools.suckless.org/9base/
- https://www.openwall.com/lists/musl/2013/11/09/3
- https://youtube.com/@roblandley1154
- https://youtube.com/watch?v=Sk9TatW9ino