Linux strings Guide - ryzendew/Linux-Tips-and-Tricks GitHub Wiki
Linux strings Guide
Complete beginner-friendly guide to strings on Linux, covering Arch Linux, CachyOS, and other distributions including extracting printable strings, binary file analysis, and text extraction.
Table of Contents
strings Basics
Extract Strings
Basic usage:
# Extract strings
strings file.bin
# Shows printable strings from file
Minimum Length
Filter by length:
# Minimum string length
strings -n 10 file.bin
# -n = number (minimum length: 10)
Extracting Strings
Default Behavior
Printable strings:
# Extract printable strings
strings file.bin
# Shows strings of 4+ characters
Save to File
Output to file:
# Save strings to file
strings file.bin > strings.txt
# Saves extracted strings
Binary Files
Binary Analysis
Analyze binary:
# Analyze binary file
strings /usr/bin/ls
# Shows strings from executable
All Characters
Include all:
# Include all characters
strings -a file.bin
# -a = all (searches entire file)
Advanced Usage
Encoding
Different encoding:
# UTF-8 encoding
strings -e S file.bin
# -e = encoding (S = single-byte)
Offset Display
Show offsets:
# Show offsets
strings -t x file.bin
# -t = radix (x = hexadecimal offset)
Troubleshooting
strings Not Found
Check installation:
# strings is part of binutils
# Usually pre-installed
# Check strings
which strings
Summary
This guide covered strings usage, string extraction, and binary file analysis for Arch Linux, CachyOS, and other distributions.
Next Steps
- hexdump Guide - Hex dump
- od Guide - Octal dump
- file Guide - File type detection
- strings Documentation:
man strings
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.