Strings

Find the readable text hidden in any binary file

About

Strings scans a file for runs of printable characters and prints them. Often the quickest hint about an unknown binary. Use it on executables, memory dumps or disk images.

Install it

pkg install binutils

Run this inside Termux. If the package is already present, pkg will say so and do nothing.

Commands worth knowing

5 of the invocations you will actually reach for. Tap the copy button to put one on your clipboard.

strings program Print every run of printable characters at the default length or longer. A first look at the text a binary holds.
strings -n 8 program Raise the minimum run length, so only longer stretches show. Short fragments are cut out.
strings -t x program Prefix each result with its offset in hexadecimal. Jump straight to it in a hex viewer.
strings -e l program Assume sixteen-bit little-endian characters. Needed for some Windows or embedded binaries.
strings -a program Scan the whole file, not only its loaded sections. Useful for raw dumps and disk images.

Worked example

Run strings -n 6 program and this is what you should see.

termux
$ strings -n 6 program
/lib/ld-linux-aarch64.so.1
libc.so.6
Usage: %s [options] file
unknown option

The same text a disassembler would show, minus the code around it.

Developed by

The GNU Project .