14

I'm using busybox in a embedded system, and I would like to check its version. How do I check the busybox version from within busybox?

13

Invoke the busybox binary as busybox, and you get a line with the Busybox version, a few more lines of fluff, and the list of utilities included in the binary.

busybox | head -1

Most utilities show a usage message if you call them with --help, with the version number in the first line.

ls --help 2>&1 | head -1
3

You can check the version on any system running busybox by running any of the commands with the --help flag to see usage. The first line of the usage calls includes a note about the busybox version:

$ cat --help
BusyBox v1.18.4 (2011-03-13 15:36:03 CET) multi-call binary.

Usage: cat [FILE]...

Concatenate FILEs and print them to stdout

If you are not running busybox but have it installed on your system, you can check by instantiating one of the utilities like so:

$ busybox cat --help

(Edit: As Gilles notes you can also call the busybox binary without a command and get the same header)

Lastly, there is also a note at the end of the man page that shows what version it's from:

$ man busybox | tail -n 1
version 1.18.4    2011-03-13     BUSYBOX(1)
  • I'm using busybox in a embedded system. If I type cat --version on it, it shows cat: unrecognized option '--version'. – Tom Brito Jul 4 '11 at 13:20
  • I also tried with ls --version with the same result ls: unrecognized option '--version' – Tom Brito Jul 4 '11 at 13:22
  • @Tom, actually @Gilles has the right answer here, it's in the header of anything you run, so running the busybox binary directly makes the most sense. Mine only works for the same reason and throws an error besides. I'll correct it. – Caleb Jul 4 '11 at 15:15
  • @Tom: I fixed my answer, use --help instead of --version :) – Caleb Jul 4 '11 at 15:27
1

Does it not report the version when you connect,

i.e.

telnet 10.10.10.1

BusyBox v0.61.pre (2008.06.11-10:37+0000) Built-in shell (ash)
Enter 'help' for a list of built-in commands.

#

or run (for example)

# busybox ash

BusyBox v1.17.1 (Debian 1:1.17.1-8) built-in shell (ash)
Enter 'help' for a list of built-in commands.

#

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.