2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Overview

what is the difference between busybox and toybox? at this time, user perspective and aspect only, not diving into the deep detail.

ahhh, what is the busybox and toybox anyway?

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...okay

read here to get more intel.

Busybox predates Android, but has never shipped with Android due to the license.

toybox

but, toybox is toybox is a fresh from-scratch implementation under an android-compatible license.toybox is replacing busybox in Aboriginal Linux one command at a time.

read here or here

let's put hands on them

busybox

let's just use docker,

docker search busybox
docker pull busybox
docker run -it <image id> /bin/sh

checking some statistics,

~ # ls -lt /bin/busybox 
-rwxr-xr-x  398 root     root       1132888 Sep  4 17:26 /bin/busybox
~ # busybox --list | wc
      397       397      2731

of course that would be depending on configuration, but so far 395 commands available, and busybox itself is just 1,132,888byte binary which is pretty much compact enough.

toybox

no official docker is available now, so just get binary to go.

wget http://landley.net/toybox/bin/toybox-x86_64
chmod +x toybox-x86_64

ls -lt toybox-x86_64 
-rwxr-xr-x 1 tomoyafujita tomoyafujita 596K  5月 30 10:47 toybox-x86_64*

./toybox-x86_64 echo hello world
hello world

./toybox-x86_64 --list | tr -s ' ' '\n' | wc
    200     200    2585

the size of binary toybox is almost half of busybox, which is 596KB. but current supported command is also half of them, really statically reasonable.

Appendix

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?