Linux Standard input, output, and error explained

A process structure is constructed with numbered channels (file descriptors) to manage open files. Processes connect to files to reach data content or devices these files represent. Processes are created with default connections for channels 0, 1, and 2, known as standard input, standard output, and standard error. Processes use channels 3 and above to connect to other files.

Linux Standard input, output, and error explained




Number Channel Name Description Default Connection Usage
0 stdin Standard input Keyboard read only
1 stdout Standard output Terminal write only
2 stderr Standard error Terminal write only
3+ filename Other files none read and/or write






Tech info

Comments