Linux has a lot of tools and bash alternatives to using. These tools vary from a little to a complete application suite. But if we have fewer resources in our Linux system or if it is an embedded system we have to use compact all in one tool and libraries. Here the solution is Busybox. Busybox is a project developed to merge popular tools and a simple shell into a single executable file.

BusyBox Pros

Only a single executable file

Low disk space usage

No dependency problems

Low memory usage

Practical installation and deployment

BusyBox Cons

Not cover all tools

Fewer features for tools

No independent tool update

Some uncommon behavior

BusyBox Installation

Busybox can be install for different distributions with related package managers.

Fedora, CentOS, RedHat:

$ sudo yum install busybox

Ubuntu, Debian, Mint, Kali:

$ sudo apt install busybox

Ubuntu, Debian, Mint, Kali:

BusyBox Help

Help can be get like below. This command also lists available commands.

$ busybox --help

Help

Commands

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

Running Commands On BusyBox

Busybox commands can be used by executing busybox and the command name as argument. There are other ways like the soft link or configuring busybox as a default command provider.

$ /bin/busybox ls

Use Commands

Providing Root Permission to BusyBox

Some commands may need root privileges. For example ping command provided by busybox needs these root privileges. In this example we provide with sudo command.

$ sudo /bin/busybox ping google.com