Busybox

Last Modified:October 17, 2023

Linux for Windows. That means to run linux type of commands under windows. Sometimes you don't need a full blow version of linux to run in your windows environment. Sometimes you just need some of the utilities which come with linux. Busybox can be your solution.


What is Busybox

Busybox is a collection of many common linux utilities in a single small executable. The utilities or functions generally have fewer options or switches as their full-featured GNU standalone executables. The goal is to provide expected functionality and at the same time provide a smaller footprint, so it can offer a complete environment for any small or embedded system.

Download

Although busybox is geared towards embedded systems, there is a version which can run on a Windows system. It is available in either a 32bit or 64bit version and can be downloaded from here.

Functionality

Many of the tools you would expect to find on a full version of linux can be found in busybox. If you run busybox from the command prompt, it displays the following:

BusyBox v1.30.0-FRP-2358-g25a1bcec7 (2018-09-11 08:30:46 BST) multi-call binary (mingw32-gcc 7.3.0-1.fc28; mingw32-crt 5.0.2-2.fc27)

BusyBox is copyrighted by many authors between 1998-2018.
Licensed under GPLv2. See source distribution for detailed copyright notices.

Usage: busybox [function [arguments]...]
or: busybox --list[-full]
or: busybox --install [DIR]
or: function [arguments]...

BusyBox is a multi-call binary that combines many common Unix utilities into a single executable. The shell in this build is configured to run built-in utilities without $PATH search. You don't need to install a link to busybox for each utility. To run external program, use full path (/sbin/ip instead of ip).

Currently defined functions:
[, [[, ar, arch, ash, awk, base64, basename, bash, bunzip2, busybox, bzcat, bzip2, cal, cat, chmod, cksum, clear, cmp, comm, cp, cpio, cut, date, dc, dd, df, diff, dirname, dos2unix, dpkg-deb, du, echo, ed, egrep, env, expand, expr, factor, false, fgrep, find, fold, fsync, ftpget, ftpput, getopt, grep, groups, gunzip, gzip, hd, head, hexdump, id, ipcalc, kill, killall, less, link, ln, logname, ls, lzcat, lzma, lzop, lzopcat, man, md5sum, mkdir, mktemp, mv, nc, nl, od, paste, patch, pgrep, pidof, pipe_progress, pkill, printenv, printf, ps, pwd, realpath, rev, rm, rmdir, rpm, rpm2cpio, sed, seq, sh, sha1sum, sha256sum, sha3sum, sha512sum, shred, shuf, sleep, sort, split, ssl_client, stat, strings, sum, tac, tail, tar, tee, test, timeout, touch, tr, true, truncate, ttysize, uname, uncompress, unexpand, uniq, unix2dos, unlink, unlzma, unlzop, unxz, unzip, usleep, uudecode, uuencode, vi, watch, wc, wget, which, whoami, whois, xargs, xxd, xz, xzcat, yes, zcat

Usage

There are a couple of options to running busybox under the windows environment. Since all the tools in busybox are command line utilities, you need to start a command prompt. Once you have a command prompt running, you have a couple of choices to run busybox.

busybox {cmd}

You can run any busybox command simply by entering "busybox cmd", such as "busybox ls".

busybox bash

Execute "busybox bash". This will change your shell to that of busybox. Now any commands which are busybox commands will run when you type them out. If it cannot find the busybox command, it will default to whatever command it finds (dos, windows) and run the appropriate command.

Busybox

busybox --install

Busybox can be installed to a particular directory using the "--install directory" switch. This will expand all the individual utilities into their own executable (or link to them). You will end up with 143 files with a ".exe" extension.

Summary

If you want to get your feet wet with learning linux, and some of the utilities you will find on linux systems, try busybox as a linux for windows solution.