Something like busybox in pure Go
Pull request Compare This branch is 11 commits behind surma:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.

GoBox v0.3

GoBox is supposed to be something like BusyBox. I.e. a single, preferably small executable which bundles all important shell tools. A swiss army knife for the command line, if you will. It is being developed with a focus on Amazon EC2 or as a small footprint basis for an OpenVZ template.

In order to keep the source code and executable small, I have cut a lot of options you might be used to from GNU Coreutils or similar. I might even have less options than BusyBox itself. I certainly have fewer applets right now, and probably ever will. But I consider that a good thing.

The current development status can be seen here


  • The shell is not a bash, sh or zsh. It is something original, written by me and is fairly limited. It does the job of acting as a shell, it‘s hardly adequate for scripting, though.
  • Telnetd has no authentication mechanism right now. It’s noting more than a network-capable pipe.


Using gb

For development, I recommend using gb. The hassle of updating makefiles and the dependencies just vanish.

.../gobox $ gb -g

Not using gb

If you just want to build GoBox, make sure you have make available and run:

.../gobox $ ./build goinstall && ./build

For both scenarios: I recommend working within the development environment (“DevEnv”) which is provided via Vagrant. After installing vagrant

.../gobox $ gem install vagrant

set up the DevEnv with

.../gobox $ vagrant up

and enter it

.../gobox $ vagrant ssh

Developing applets

  • Copy applets/template and name the copy like your applet
  • Rename template.go and edit its contents to fit your applet
  • Add your applet to cmd/gobox/applets.go

The template provides the basic framework you should stick to that.

Why is there not real shell?

I got this question a lot and I have 2 main reasons:

  • I seriously did not want to implement the broken and god-awful syntax of bash or any other currently used shell!
  • You have Go. Do you need anything more lightweight? The philosohpy behind this project is, that it is cheap to (re)build and deploy. So you don’t really use scripting anymore. If you need to automate some process, write an applet in Go and integrate it with GoBox and push it.


All these scripts are supposed to be run from the root of the repository inside the DevEnv. Most of them will work on the outside as well, though.

    This script will build a kernel compatible initramfs containing just enough to be able to boot with it. You usually don’t need to run this script yourself as does it for you. For details on customization take a look at the script itself and the kernel’s implementation

    This script builds an initramfs and starts a virtual machine booting the DevEnv’s kernel together with the newly build initramfs.

    You don’t need to run this script except if you updated Go! A while ago, the Go team has decided to use libc´s DNS lookup routines instead of their own´s which requires dynamic linking. This script will recompile the net package of the Go distribution to reenable static linking.




If you have ideas for missing applets, found a bug or have a suggestion, use this project’s issues. If you want to participate, just fork and code away. For questions contact me:



(c) 2011 Alexander "Surma" Surma