Explain what happens when you run ls

Quick Overview

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.

Explain what happens when you run ls

Company: Google

Role: Software Engineer

Category: Software Engineering Fundamentals

Difficulty: medium

Interview Round: Technical Screen

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`

Quick Answer: 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.

|Home/Software Engineering Fundamentals/Google
Google logo
Google
Feb 1, 2026, 12:00 AM
mediumSoftware EngineerTechnical ScreenSoftware Engineering Fundamentals
7
0

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
Loading comments...