Katkat

Explain what happens when you run ls

GoogleSoftware Engineer · Technical Screen

Last updated

This question evaluates a candidate's understanding of process creation and execution, shell command resolution, kernel and VFS filesystem interactions, and how directory entries and file metadata are retrieved; category/domain: Software Engineering Fundamentals.

In Linux, explain the end-to-end flow of what happens when a user types ls in a shell and presses Enter.

Include:

  • What the shell does
  • How the executable is found and started
  • Key system calls / kernel filesystem interactions
  • How directory entries and file metadata are retrieved
  • What changes for common flags like -l, -a, and -R