HOME

TheInfoList



OR:

Toybox is a
free and open-source software Free and open-source software (FOSS) is software available under a license that grants users the right to use, modify, and distribute the software modified or not to everyone free of charge. FOSS is an inclusive umbrella term encompassing free ...
implementation of over 200
Unix Unix (, ; trademarked as UNIX) is a family of multitasking, multi-user computer operating systems that derive from the original AT&T Unix, whose development started in 1969 at the Bell Labs research center by Ken Thompson, Dennis Ritchie, a ...
command line utilities such as '' ls'', '' cp'', and '' mv''. The Toybox project was started in 2006, and became a 0BSD licensed BusyBox alternative. Toybox is used for most of Android's command-line tools in all currently supported Android versions, and is also used to build Android on Linux and macOS. All of the tools are tested on Linux, and many of them also work on BSD and macOS.


Functionality and aim

Toybox aims to provide a
BSD license BSD licenses are a family of permissive free software licenses, imposing minimal restrictions on the use and distribution of covered software. This is in contrast to copyleft licenses, which have share-alike requirements. The original BSD lic ...
d replacement for the GPL licensed BusyBox. Toybox's major technical design goals are simplicity, smallness, speed and standard compliance. Toybox aims to be mostly
POSIX The Portable Operating System Interface (POSIX; ) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines application programming interfaces (APIs), along with comm ...
-2008 and LSB 4.1 compatible, and doesn't focus on having every option found in GNU counterparts. Toybox is licensed using the permissive 0BSD license, where BusyBox uses the
copyleft Copyleft is the legal technique of granting certain freedoms over copies of copyrighted works with the requirement that the same rights be preserved in derivative works. In this sense, ''freedoms'' refers to the use of the work for any purpose, ...
GNU General Public License The GNU General Public Licenses (GNU GPL or simply GPL) are a series of widely used free software licenses, or ''copyleft'' licenses, that guarantee end users the freedom to run, study, share, or modify the software. The GPL was the first ...
, which led to different usage domains. BusyBox is mostly used in the copyleft FOSS domain, while Toybox is used mostly with
permissive license A permissive software license, sometimes also called BSD-like or BSD-style license, is a free-software license which instead of copyleft protections, carries only minimal restrictions on how the software can be used, modified, and redistributed, ...
d projects and by commercial companies, e.g. Google's Android, which is an explicit target of Toybox.celf-2015.txt
by Rob Landley (2015)
Feature-wise, Toybox has not reached parity with BusyBox.


History

Toybox was started in early 2006 by Rob Landley after he ended his BusyBox maintainership due to a dispute with Bruce Perens, the original creator of BusyBox. In 2008, the project went dormant until the end of 2011. Rob Landley resumed work on Toybox, starting with relicensing from the GPL-2.0-only license to the BSD-2-Clause licenseToybox relaunch
on toybox.landley.narkive.com (2011-11-20)
Switch to 2-clause BSD license (with caveat about scripts directory).
0.2.0 by landley on 15 Nov 2011
with the goal of superseding the Android command line implementation. At the beginning of 2012,
Sony is a Japanese multinational conglomerate (company), conglomerate headquartered at Sony City in Minato, Tokyo, Japan. The Sony Group encompasses various businesses, including Sony Corporation (electronics), Sony Semiconductor Solutions (i ...
employee Tim Bird suggested creating a permissively licensed alternative to BusyBox. In March 2013, the project was relicensed to an even more permissive 0BSD license.Simplify license text, as mentioned on the mailing list.
by Landley (14 Mar 2013)
At the end of 2014, Toybox was integrated into the Android 6.0.x "Marshmallow" development branches for use on devices.Android gets a toybox
on lwn.net by Jake Edge (January 14, 2015)
toybox
on android.googlesource.com (2014-12-28)
Issue 76861: Importing parts of Toybox into Android, including dos2unix, unix2dos, sort, uniq, and usleep
/ref> In 2018, a host Toybox prebuilt was added to AOSP to help make the Android build itself more hermetic.


Controversy

In January 2012 the proposal of creating a BSD license alternative to the GPL licensed BusyBox project drew harsh criticism from Matthew Garrett for taking away the only relevant tool for copyright enforcement of the
Software Freedom Conservancy Software Freedom Conservancy, Inc. (also known as "Conservancy") is an organization that provides a Nonprofit organization, non-profit home, infrastructure support, and legal support for free software, free and open source software projects. The ...
group. Rob Landley, who had started the BusyBox-based lawsuits, responded that this was intentional, explaining that the lawsuits had not benefited the project but that they had led to corporate avoidance, expressing a desire to stop the lawsuits "in whatever way I see fit".


Project progress

The official Toybox documentation lists an overview of the available, partially available, and missing commands.Toybox Status
/ref> As of September 2024, Version 0.8.11 achieves approximately 80% of the project's implementation goals targeted for 1.0.
/ref>
;List of Toybox Commands
* acpi — Show status of power sources and thermal devices. * adduser, addgroup — Add a user or group to the system. * ar — Create, modify, and extract from archives. *
arch An arch is a curved vertical structure spanning an open space underneath it. Arches may support the load above them, or they may perform a purely decorative role. As a decorative element, the arch dates back to the 4th millennium BC, but stru ...
— Print machine (hardware) name, same as uname -m. * arp — The Address Resolution Protocol (ARP) * arping — Send ARP REQUEST to a neighbour host * ascii — Display
ASCII ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
character set. * at — Execute commands at a later time. * awk — pattern scanning and processing language. *
base32 Base32 is an encoding method based on the Radix, base-32 numeral system. It uses an alphabet of 32 Numerical digit, digits, each of which represents a different combination of 5 bits (25). Since base32 is not very widely adopted, the question of no ...
— Encode or decode in base32. *
base64 In computer programming, Base64 is a group of binary-to-text encoding schemes that transforms binary data into a sequence of printable characters, limited to a set of 64 unique characters. More specifically, the source binary data is taken 6 bits ...
— Encode or decode in base64. * basename — Return non-directory portion of a pathname removing suffix. * bc — Arbitrary-precision arithmetic language. * blkdiscard — Discard device sectors. * blkid — Print type, label and UUID of filesystem on a block device or image. * — Call ioctls on each listed block device. * bunzip2 — Decompress bzip2 files. * — Decompress bzip2 files to stdout. *
cal Cal or CAL may refer to: Arts and entertainment * ''Cal'' (novel), a 1983 novel by Bernard MacLaverty * "Cal" (short story), a science fiction short story by Isaac Asimov * ''Cal'' (1984 film), an Irish drama starring John Lynch and Helen Mir ...
— Print a calendar. * cat — Copy (concatenate) files to stdout. * cd — Change the working directory. * chattr — Change file attributes on a Linux file system. *
chgrp , short for change group, is a shell command for changing the group associated with a Unix-based file system file including special files such as directories. Changing the group of a file is restricted to a super-user (such as via ) or to ...
— Change group of one or more files. *
chmod is a shell command for changing access permissions and special mode flags of files (including special files such as directories). The name is short for ''change mode'' where ''mode'' refers to the permissions and flags collectively. The co ...
— Change mode of listed files. *
chown , short for change owner, is a shell command for changing the owning user of Unix-based file system files including special files such as directories. The ownership of a file may only be altered by a super-user (such as via sudo). A reg ...
— Change owner of one or more files. *
chroot chroot is a shell (computer), shell command (computing), command and a system call on Unix and Unix-like operating systems that changes the apparent root directory for the current running process and its Child process, children. A program that i ...
— Run command within a new root directory. * chrt — Get/set a process' real-time scheduling policy and priority. * chsh — Change your login shell. * — Change to virtual terminal number N. * cksum — For each file, output crc32 checksum value, length and name of file. * clear — Clear the screen. * cmp — Compare the contents of two files. * comm — Select or reject lines common to two files. *
count Count (feminine: countess) is a historical title of nobility in certain European countries, varying in relative status, generally of middling rank in the hierarchy of nobility. Pine, L. G. ''Titles: How the King Became His Majesty''. New York: ...
— Copy stdin to stdout, displaying simple progress indicator to stderr. * cp — Copy files. *
cpio cpio is a general file archiver utility and its associated file format. It is primarily installed on Unix-like computer operating systems. The software utility was originally intended as a tape archiving program as part of the Programmer's Work ...
— Copy files into and out of a "newc" format cpio archive. *
crc32 Computation of a cyclic redundancy check is derived from the mathematics of polynomial division, modulo two. In practice, it resembles long division of the binary message string, with a fixed number of zeroes appended, by the "generator poly ...
— Output crc32 checksum for each file. * cut — Print selected parts of lines from each FILE to standard output. * dd — Convert and copy a file. * date — Set/get the current date/time. * devmem — Read/write physical address via /dev/mem. * df — Shows total/used/available disk space for each filesystem listed on the command line, or all currently mounted filesystems. *
diff In computing, the utility diff is a data comparison tool that computes and displays the differences between the contents of files. Unlike edit distance notions used for other purposes, diff is line-oriented rather than character-oriented, but i ...
- Compare two files. * dirname — Show directory portion of path. * dmesg — Print or control the kernel ring buffer. * dnsdomainname — Show domain this system belongs to (same as hostname -d). * dos2unix — Convert newline format from dos "\r\n" to unix "\n". * du — Show disk usage, space consumed by files and directories. * echo — Write each argument to stdout, with one space between each, followed by a newline. *
egrep grep is a command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed command g/re/p (global regular expression search and print), which has the same effect. grep was originally de ...
— Show lines matching extended regular expressions. * eject — Eject DEVICE or default /dev/cdrom. * env — Set the environment for command invocation, or list environment variables. * expand — Expand tabs to spaces according to tabstops. * factor — Factor integers. * fallocate — Tell the filesystem to allocate space for a file. * false — Return nonzero. * fdisk — Manipulate disk partition table. *
fgrep grep is a command line interface, command-line utility for searching plaintext datasets for lines that match a regular expression. Its name comes from the ed (text editor), ed command g/re/p (global regular expression search and print), which has ...
— Show lines matching regular expressions. * file — Examine the given files and describe their content types. * find — Search directories for matching files. * flock — Manage advisory file locks. * fold — Filter for folding lines. * fmt — Reformat input to wordwrap at a given line length, preserving existing indentation level, writing to stdout. * free — Display the total, free and used amount of physical memory and swap space. * freeramdisk — Free all memory allocated to specified ramdisk. * — Freeze or unfreeze a filesystem. * — Print type of filesystem on a block device or image. * fsync — Synchronize a file's in-core state with storage device. * ftpget — Use File Transfer Protocol (FTP) to get a file from an FTP server. * ftpput — Use File Transfer Protocol (FTP) to put a file to an FTP server. * getconf — Get system configuration values. * getopt — Parse command line options and parameters. * grep — Show lines matching regular expressions. * groups — Print the groups a user is in. * gunzip — Decompress gz files. * halt — Restart, halt or powerdown the system. *
head A head is the part of an organism which usually includes the ears, brain, forehead, cheeks, chin, eyes, nose, and mouth, each of which aid in various sensory functions such as sight, hearing, smell, and taste. Some very simple ani ...
— Copy first lines from files to stdout. *
help Help may refer to: Arts, entertainment, and media Films * Help (2010 film), ''Help'' (2010 film), a Bollywood horror film * Help (2021 theatrical film), ''Help'' (2021 theatrical film), a British psychological thriller film * Help (2021 TV ...
— Show usage information for toybox commands. * hexedit — Hexadecimal file editor. * hostname — Get/set the current hostname. * — Get/set the hardware clock. * i2cdetect — Detect i2c devices. * i2cdump — Dump i2c registers. * i2cget — Read an i2c register. * i2cset — Write an i2c register. * iconv — Convert character encoding of files. * id — Print user and group ID. *
ifconfig ifconfig (short for ''interface config'') is a system administration utility in Unix-like operating systems for network interface configuration. The utility is a command-line interface A command-line interface (CLI) is a means of inter ...
— Display or configure network interface. * — Run a program when a filesystem event occurs. * insmod — Load the module named MODULE passing options if given. * install — Copy files and set attributes. * ionice — Change the I/O scheduling priority of a process. * — Display or change I/O priority of existing process. * iotop — Rank processes by I/O. * kill — Send signal to process. * killall — Send a signal (default: TERM) to all processes with the given names. * killall5 — Send a signal to all processes outside current session. * less — opposite of more * link — Create hardlink to a file. * ln — Create a link between FROM and TO. * logger — Log message (or stdin) to syslog. *
login In computer security, logging in (or logging on, signing in, or signing on) is the process by which an individual gains access to a computer system or program by identifying and authenticating themselves. Typically, user credential ...
— Log in as a user, prompting for username and password if necessary. * logname — Print the current user name. * losetup — Associate a loopback device with a file, or show current file (if any) associated with a loop device. * ls — List files. * lsattr — List file attributes on a Linux file system. * lsmod — Display the currently loaded modules, their sizes and their dependencies. * lspci — List PCI devices. * lsusb — List USB hosts/devices. * — Create a range of special files as specified in a device table. * mcookie — Generate a 128-bit strong random number. * md5sum — Calculate md5 hash for each input file, reading from stdin if none. * memeater — Internally allocate and use memory. * microcom — Simple serial console. * mix — List OSS sound channels (module snd-mixer-oss), or set volumes. *
mkdir (make directory) command (computing), command in the Unix, DOS, Digital Research, DR FlexOS, IBM OS/2, Microsoft Windows, and ReactOS operating systems is used to make a new directory (file systems), directory. It is also available in the Unified ...
— Create one or more directories. * mkfifo — Create FIFOs (named pipes). * mknod — Create a special file NAME with a given type. * mkpasswd — Crypt PASSWORD using crypt(3). * mkswap — Set up a Linux swap area on a device or file. * mktemp — Safely create a new file "DIR/TEMPLATE" and print its name. * modinfo — Display module fields for modules specified by name or .ko path. * mount — Mount new filesystems on directories. * mountpoint — Check whether the directory or device is a mountpoint. * mv — Move files. * nbd-client — Connect to an NBD server. * nc/ netcat — Forward stdin/stdout to a file or network connection. *
netstat In computing, netstat is a command-line network utility that displays open network sockets, routing tables, and a number of network interface (network interface controller or software-defined network interface) and network protocol statistic ...
— Display networking information. *
nice Nice ( ; ) is a city in and the prefecture of the Alpes-Maritimes department in France. The Nice agglomeration extends far beyond the administrative city limits, with a population of nearly one millionnl — Number lines of input. * nohup — Run a command that survives the end of its terminal. * nproc — Print number of processors. * — Run COMMAND in an existing (set of) namespaces. * od — Dump data in octal/hex. * oneit — Simple init program that runs a single supplied command line * partprobe — Tell the kernel about partition table changes. * passwd — Update user's authentication tokens. * paste — Merge corresponding lines from each input file. * patch — Apply a unified diff to one or more files. *
pgrep pgrep is a command-line utility initially written for use with the Solaris 7 operating system by Mike Shapiro. It has since been available in illumos and reimplemented for the Linux and BSDs ( DragonFly BSD, FreeBSD, NetBSD, and OpenBSD). ...
— Search for process(es). * — Print the PIDs of all processes with the given names. * ping — Check network connectivity by sending packets to a host and reporting its response. * pivot root — Swap OLD and NEW filesystems (as if by simultaneous mount—move), and move all processes with chdir or chroot under OLD into NEW (including kernel threads) so OLD may be unmounted. * pkill — look up or signal processes based on name and other * pmap — Report the memory map of a process or processes. * poweroff — Restart, halt or powerdown the system. * printenv — Print environment variables. * printf — Format and print ARGUMENT according to FORMAT, using C printf syntax. * prlimit — Print or set resource limits for process number PID. * ps — List processes. * pwd — Print working (current) directory. * pwdx — Print working directory of processes listed on command line. * readahead — Preload files into disk cache. * readlink — Show what symlink points to. * realpath — Display the canonical absolute pathname * reboot — Restart, halt or powerdown the system. * renice — set nice values of running processes * reset — Reset the terminal. * rev — Output each line reversed, when no files are given stdin is used. * rfkill — Enable/disable wireless devices. * rm — Remove each argument from the filesystem. *
rmdir In computing, rmdir (or rd) is a command which will remove an empty directory on various operating systems. Implementations The command is available in Unix (e.g. macOS, Solaris, AIX, HP-UX), Unix-like (e.g. FreeBSD, Linux), DOS, Digital ...
— Remove one or more directories. * rmmod — Unload the module named MODULE from the Linux kernel. * rtcwake — Enter the given sleep state until the given time. * sed — Stream editor. * seq — Count from first to last, by increment. * setfattr — Write POSIX extended attributes. * setsid — Run process in a new session. * sha1sum — Calculate sha hash for each input file, reading from stdin if none. * shred — Securely delete a file by overwriting its contents with random data. *
sleep Sleep is a state of reduced mental and physical activity in which consciousness is altered and certain Sensory nervous system, sensory activity is inhibited. During sleep, there is a marked decrease in muscle activity and interactions with th ...
— Wait before exiting. * sntp — Simple Network Time Protocol client. * sort — Sort all lines of text from input files (or stdin) to stdout. * split — Copy INPUT (or stdin) data to a series of OUTPUT (or "x") files with alphabetically increasing suffix (aa, ab, ac... az, ba, bb...). * stat — Display status of files or filesystems. * strings — Display printable strings in a binary file * su — Switch user, prompting for password of new user when not run as root. * swapoff — Disable swapping on a given swapregion. * swapon — Enable swapping on a given device/file. * switch root — Use from PID 1 under initramfs to free initramfs, chroot to NEW_ROOT, and exec NEW_INIT. * sync — Write pending cached data to disk (synchronize), blocking until done. * sysctl — Read/write system control data (under /proc/sys). * tac — Output lines in reverse order. *
tail The tail is the elongated section at the rear end of a bilaterian animal's body; in general, the term refers to a distinct, flexible appendage extending backwards from the midline of the torso. In vertebrate animals that evolution, evolved to los ...
— Copy last lines from files to stdout. * tar — Create, extract, or list files in a .tar (or compressed t?z) file. * taskset — Launch a new task which may only run on certain processors, or change the processor affinity of an existing PID. * tee — Copy stdin to each listed file, and also to stdout. * test — Return true or false by performing tests. *
time Time is the continuous progression of existence that occurs in an apparently irreversible process, irreversible succession from the past, through the present, and into the future. It is a component quantity of various measurements used to sequ ...
— Run command line and report real, user, and system time elapsed in seconds. * timeout — Run command line as a child process, sending child a signal if the command doesn't exit soon enough. *
top Top most commonly refers to: * Top, a basic term of orientation, distinguished from bottom, front, back, and sides * Spinning top, a ubiquitous traditional toy * Top (clothing), clothing designed to be worn over the torso * Mountain top, a moun ...
— Show process activity in real time. *
touch The somatosensory system, or somatic sensory system is a subset of the sensory nervous system. The main functions of the somatosensory system are the perception of external stimuli, the perception of internal stimuli, and the regulation of bo ...
— Update the access and modification times of each FILE to the current time. *
true True most commonly refers to truth, the state of being in congruence with fact or reality. True may also refer to: Places * True, West Virginia, an unincorporated community in the United States * True, Wisconsin, a town in the United States * ...
— Return zero. * truncate — Set length of files, extending sparsely if necessary. * ts — timestamp standard input. * tsort — Topologically sort for dependency resolution. * tty — Show filename of terminal connected to stdin. * — Create and delete tun/tap virtual Ethernet devices. * ulimit — Print or set resource limits for process number PID. * umount — Unmount the listed filesystems. * uname — Print system information. *
unicode Unicode or ''The Unicode Standard'' or TUS is a character encoding standard maintained by the Unicode Consortium designed to support the use of text in all of the world's writing systems that can be digitized. Version 16.0 defines 154,998 Char ...
— universal character set. * uniq — Report or filter out repeated lines in a file. * unix2dos — Convert newline format from unix "\n" to dos "\r\n". * unlink — Delete one file. * unshare — Create new container namespace for this process and its children, so some attribute is not shared with the parent process. * uptime — Tell the current time, how long the system has been running, the number of users, and the system load averages for the past 1, 5 and 15 minutes. * usleep — Pause for MICROSECONDS microseconds. * uudecode — Decode a uuencoded file. * uuencode — Encode a binary file. * — Create and print a new RFC4122 random UUID. * vconfig — Create and remove virtual Ethernet devices. * vmstat — Print virtual memory statistics. * w — Show who is logged on and since how long they logged in. *
watch A watch is a timepiece carried or worn by a person. It is designed to maintain a consistent movement despite the motions caused by the person's activities. A wristwatch is worn around the wrist, attached by a watch strap or another type of ...
— Run PROG every -n seconds, showing output. * wc — Count lines, words, and characters in input. *
which Which may refer to: * a relative pronoun * an English interrogative word * which (command), an operating system command * Which?, a UK charity and its magazine See also * English relative clauses Relative clauses in the English language are ...
— Search $PATH for executable files matching filenames. * watchdog — software watchdog daemon. * who — Print information about logged in users. * whoami — Print the current user name. * xargs — Run command line one or more times, appending arguments from stdin. * xxd — Hexdump a file to stdout. * yes — Repeatedly output line until killed. * zcat — Decompress gz files to stdout.


See also

*
GNU Core Utilities The GNU Core Utilities or coreutils is a collection of GNU software that implements many standard, Unix-based shell commands. The utilities generally provide POSIX compliant interface when the environment variable is set, but otherwise offers ...
* Linux on embedded systems * Linux for mobile devices


References


External links

* {{official website, http://www.landley.net/toybox/ Linux software Software using the BSD license Unix software Public-domain software with source code Free software programmed in C