When I do strace echo hello, I see it is using /bin/echo, but built-in echo should be found first. Is it a functionality of strace to skip built-in commands? strace -- version 4.5.19

I understand that strace won't work on built-in commands the way it works on system executables.

2 Answers 2


Because strace isn't a shell, strace uses exec.

  • Wow, I feel dumb. OK I was thinking about it the wrong way. You are correct, I will accept the answer when the time period passes.
    – Gregg Leventhal
    Jul 10, 2013 at 13:34

When you type a command to the shell (e.g., echo hello world), the shell interprets that command and will check to see if a shell built-in command can be used before looking for a separate executable.

When you use strace, you are asking it to locate an executable and run it on your behalf. Unlike the shell, strace has no built-in commands of its own.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .