On a UNIX system there are two main ways of passing arguments from a parent to a child process when spawning a new process:
- the command line: a string that is usually given explicitly by the user
- the environment: a set of key/value pairs that is inherited from the parent process implicitly but that can also be modified explicitly when starting a process
(You can observe the values of the command line and the environment by looking at /proc/<pid>/cmdline
and /proc/<pid>/environ
.)