Linux have a lot of tools and bash alternatives to use. These tools varias from a little to to a complete application suite. But if we have less resources in our Linux system or if it is a embedded system we have to use compact all in one tools and libraries.
Here the solution is Busybox. Busybox is a project developed to merge poupular tools and a simple shell into a single executable file.
- Only single executable file
- Low disk space usage
- No dependency problems
- Low memory usage
- Practical installation and deployment
- Not cover all tools
- Less features for tools
- No independent tool update
- Some uncommon behaivour
Busybox can be install for different distributions with related package managers.
Fedora, CentOS, RedHat:
$ yum install busybox
Ubuntu, Debian, Mint, Kali:
$ apt install busybox
Help can be get like below. This command also lists available commands.
$ busybox --help
Following commands are currently supported by busybox
[, [[, acpid, adjtimex, ar, arp, arping, ash, awk, basename, blockdev, brctl, bunzip2, bzcat, bzip2, cal,
cat, chgrp, chmod, chown, chpasswd, chroot, chvt, clear, cmp, cp, cpio, cttyhack, cut, date, dc, dd,
deallocvt, depmod, devmem, df, diff, dirname, dmesg, dnsdomainname, dos2unix, du, dumpkmap, dumpleases,
echo, egrep, env, expand, expr, false, fgrep, find, fold, free, freeramdisk, fstrim, ftpget, ftpput,
getopt, getty, grep, groups, gunzip, gzip, halt, head, hexdump, hostid, hostname, httpd, hwclock, id,
ifconfig, init, insmod, ionice, ip, ipcalc, kill, killall, klogd, last, less, ln, loadfont, loadkmap,
logger, login, logname, logread, losetup, ls, lsmod, lzcat, lzma, lzop, lzopcat, md5sum, mdev, microcom,
mkdir, mkfifo, mknod, mkswap, mktemp, modinfo, modprobe, more, mount, mt, mv, nameif, nc, netstat,
nslookup, od, openvt, patch, pidof, ping, ping6, pivot_root, poweroff, printf, ps, pwd, rdate, readlink,
realpath, reboot, renice, reset, rev, rm, rmdir, rmmod, route, rpm, rpm2cpio, run-parts, sed, seq,
setkeycodes, setsid, sh, sha1sum, sha256sum, sha512sum, sleep, sort, start-stop-daemon, stat, strings,
stty, swapoff, swapon, switch_root, sync, sysctl, syslogd, tac, tail, tar, taskset, tee, telnet, test,
tftp, time, timeout, top, touch, tr, traceroute, traceroute6, true, tty, udhcpc, udhcpd, umount, uname,
uncompress, unexpand, uniq, unix2dos, unlzma, unlzop, unxz, unzip, uptime, usleep, uudecode, uuencode,
vconfig, vi, watch, watchdog, wc, wget, which, who, whoami, xargs, xz, xzcat, yes, zcat
Busybox commands can be used by executing busy box and the command name as argument. There is other ways like soft link or configuring busybox as default command provider.
$ /bin/busybox ls
Some commands may need root privileges. For example
ping command provided by busybox needs these root privileges. In this example we provide with
$ sudo /bin/busybox ping google.com