Use the PID from htop with a direct shell command.

Section: Inspection tools

Attach strace manually

bash
bash
sudo strace -p 12345
Explanation

Helpful if you want to control strace flags more precisely than the in-app shortcut.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Inspection tools
List files for a PID manually
Use lsof directly from the shell.
OpenIn sheetbashsame section
Trace system calls with strace
Attach strace to the selected process if installed.
OpenIn sheettextsame section
List open files with lsof
Inspect file descriptors for the selected process.
OpenIn sheettextsame section
Display file locks
Inspect active file locks for the selected process.
OpenIn sheettextsame section
Inspect CPU affinity from the shell
Complement htop when tracking placement or pinning.
OpenIn sheetbashsame section
Use htop to locate a PID, then kill from shell
Classic shell companion flow.
OpenIn sheetbash1 tag match