What makes stdin, stdout, and stderr "standard"?


#1

Question

The introduction to standard input (stdin), standard output (stdout), and standard error (stderr) in this lesson seem to be the same thing as the usual input, output, and error. Why the distinction of standard?

Answer

The distinction of standard has to do with where our input is being read from and where our output/error are being written to. When we speak about stdin, stdout, and stderr, we’re implicitly talking about the default locations in an environment where our programs will interact with. Being default, we don’t control where these locations are which makes input/output redirection particularly useful and important.


FAQ: Redirection - stdin, stdout, and stderr