• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • VCS
  • Interview Questions
  • Database
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

extrace Command Examples in Linux

by Deepika

extrace is a command-line tool that can be used to trace the exec() system calls made by a process. exec() is a system call that is used to execute a new program, replacing the current process. This call is often used to run other programs, scripts or commands.

extrace is used to trace the exec() system calls made by a process, it does this by monitoring the process system calls and printing a line of output to the terminal every time it detects an exec() call. The output will include the process ID of the process that made the call, the path to the program that was executed, and any command-line arguments passed to the program.

extrace can be useful for understanding how a process works and what it is doing. It can also be used to troubleshoot issues with a process, and to understand what other programs or commands are being executed by a process.

extrace Command Examples

1. Trace all program executions occurring on the system:

# sudo extrace

2. Run a command and only trace descendants of this command:

# sudo extrace command

3. Print the current working directory of each process:

# sudo extrace -d

4. Resolve the full path of each executable:

# sudo extrace -l

5. Display the user running each process:

# sudo extrace -u

Filed Under: Linux

Some more articles you might also be interested in …

  1. pacaur Command Examples in Linux
  2. protonvpn-cli connect Command Examples
  3. ipset: command not found
  4. Set FTP Autologin with .netrc file in Linux
  5. CentOS / RHEL : How to collect sosreport
  6. catimg: Image printing in the terminal
  7. make Command Examples in Linux
  8. autojump: Quickly jump among the directories you visit the most
  9. btrfs restore Command Examples in Linux
  10. How to check change log of RPM packages on CentOS/RHEL

You May Also Like

Primary Sidebar

Recent Posts

  • Vanilla OS 2 Released: A New Era for Linux Enthusiasts
  • mk Command Examples
  • mixxx Command Examples
  • mix Command Examples

© 2025 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright