Inputs to and outputs from programs are known as streams in Linux. The input usually comes from the keyboard and the output goes to the screen. You can redirect these input and output streams to come from or go to other sources.

Linux shells use three standard streams:

  • standard input – usually the input from the keyboard. For example, commands that are executed by typing them.
  • standard output – displays the output from commands, usually to the terminal.
  • standard error – displays error output from commands. It is usually sent to the same output as standard output, but it can be redirected.

Here is the graphical representation of these streams (Photo credit: Wikipedia):

linux streams:

Geek University 2022