Amazon interview question

3. How Linux searches for commands internally?