From the course: Linux: Shells and Processes

Unlock the full course today

Join today to access over 24,800 courses taught by industry experts.

Command input and output

Command input and output - Linux Tutorial

From the course: Linux: Shells and Processes

Command input and output

- [Instructor] When a command in Linux runs, the shell creates three streams. The input stream is referred to as standard input. The output stream is referred to as standard output, and the error stream is referred to as standard error. These streams are used for data input and output for the command and are created automatically by the shell. All three streams have numeric descriptors assigned to them to help us differentiate them. Standard in is file descriptor number zero. Standard out is file descriptor number one, and standard error is file descriptor number two. By default, all output of a command goes to the terminal or screen. This includes both standard out and standard error. It's important to understand that we can split these two outputs and interact with them individually. Standard out is the successful output from a command. Standard error is used for error messages. Splitting the output allows us to see the…

Contents