What happens when you type ls -l in the shell

Let’s look at a specific case but let’s clarify concepts of what a terminal is and what a shell is since they are not the same thing.


Input and output environment in text


Command line interpreter.

  • there are two ways to pass the command with the full path or without the path, in this case, we will see ls,
    the shell this ls takes it as a string she creates a child process, here she passes all the magic, the ls command or any other these are files that are in the environment the shell has to look for that command in the environment it is usually in the path
    that looks something like this:
  • He finds the command he saves that path along with the command, at this point the shell already knows where the command is, what he is going to do now is execute it, the output we already know gives this, but maybe we didn’t know what the shell had to do to interpret the command.

Software Developer

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store