Let's see how strace can be used in various ways to trace the execution of any program, from start to end:
- To trace the execution of any executable command in Linux, simply run the strace command followed by the executable command. If we use strace for the ls command, we get the following output:

- In the preceding screenshot, the output displayed has been truncated. If we check the last few lines of the output, we can see that the write system calls where the listing of the current directory is displayed:

- To check the listing, ...