How to view files in binary from bash?

Solution 1:

xxd does both binary and hexadecimal.

bin:

xxd -b file

hex:

xxd file

Solution 2:

hexdump -C yourfile.bin

unless you want to edit it of course. Most linux distros have hexdump by default (but obviously not all).