When you interact with bash (via graphical terminal) what file does bash read from in order to obtain user input?

Solution 1:

You should be studying devpts, defined as:

devpts is a virtual filesystem available in the Linux kernel since version 2.1.93 (April 1998). It is normally mounted at /dev/pts and contains solely device files which represent slaves to the multiplexing master located at /dev/ptmx.

In fact "pts" stands for "pseudo terminal slave". It is purely virtual and resides in memory only, existing only for graphical terminals that don't have real input terminals.

It is further defined as:

A pseudoterminal ("pseudo TTY" or "PTY") is a pair of pseudo-devices – a slave and a master – that provide a special sort of communication channel. The slave pseudo-device emulates a physical computer text terminal, like e.g. the DEC VT100, it can read and write text as though it was such a physical terminal. The master pseudo-device provides the means by which a program providing a text-based user interface acts with and controls its slave. Widely spread programs with a text-based user interface are terminal emulators, e.g. xterm, gnome-terminal or Konsole, or programs using SSH or telnet. Writing to the master is exactly like typing on a terminal, thus the master pseudo-device acts kind of like the person sitting in front of the physical computer text terminal.

You will also find good information in the post Why are there so many /dev/tty in Linux?