Using system tools – strace

When running any command or program on our Linux machine, you might wonder what the background working of it is. For this, we have a very useful tool in Linux called strace.

This a command-line tool that can be also used as a diagnostic or debugging tool. strace monitors the interaction between processes and the Linux kernel and is helpful when we want to debug the execution of any program.

Getting ready

This tool is available for all Linux-based systems by default. Hence, nothing else needs to be configured to start using strace.

How to do it…

Let's see how strace can be used in various ways to trace the execution of any program from start to end.

  1. To trace the execution of any executable command in Linux, simply run the ...

Get Practical Linux Security Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.