-
-
Notifications
You must be signed in to change notification settings - Fork 2
Linux strace Guide
Mattscreative edited this page Dec 5, 2025
·
2 revisions
Complete beginner-friendly guide to strace on Linux, covering Arch Linux, CachyOS, and other distributions including system call tracing, debugging, and process monitoring.
Arch/CachyOS:
# Install strace
sudo pacman -S straceDebian/Ubuntu:
sudo apt install straceFedora:
sudo dnf install straceBasic usage:
# Trace command
strace ls
# Shows all system callsRunning process:
# Trace running process
strace -p PID
# -p = PID (traces process by PID)View calls:
# Show system calls
strace ls
# Shows:
# - open()
# - read()
# - write()
# - close()
# etc.Statistics:
# Summary statistics
strace -c ls
# -c = count (shows summary)Specific calls:
# Filter system calls
strace -e open ls
# -e = trace (only open() calls)Multiple calls:
# Multiple filters
strace -e open,read,write ls
# Traces multiple call typesCheck installation:
# Check strace
which strace
# Install if missing
sudo pacman -S straceThis guide covered strace usage, system call tracing, and debugging for Arch Linux, CachyOS, and other distributions.
- ltrace Guide - Library call tracing
- Process Management - Process monitoring
- Debugging - Debugging tools
-
strace Documentation:
man strace
This guide covers Arch Linux, CachyOS, and other Linux distributions. For distribution-specific details, refer to your distribution's documentation.