Typing ls -l in the Shell explained.

ls -l example

1- READ INPUT

2- TOKENS

If we type: 
"/bin/ls -l /usr/"
The resulting data structure (array of char pointers) will be:
char *arguments[] = {"/bin/ls", "-l", "/usr/", NULL};

3- CHECK FOR ALIAS AND EXPANSIONS

4- Check for Builtins

5. PATH

type echo $PATH
if the path doesn’t exist example

6. EXECUTE

fork() ls from bash
int execv(const char *path, char *const argv[], char *const envp[]);

--

--

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