Terminal emulator

A terminal emulator, terminal application, or term, (sometimes also refered to as a tty) X).]] This usually takes the form of a window in which the user can enter commands and view output, or of a fullscreen virtual console. A terminal emulator will generally start the shell that is defined as the login shell for a given user. On Gentoo, the default shell is bash.

After booting, Gentoo will by default show either a login prompt on a virtual console, or a display manager. See next section about virtual consoles and how to switch between them.

If an X environment has been set up, there are many terminal emulator options available for the user to choose from - see software section.

Virtual consoles and switching
A virtual console (VC), aka virtual terminal (VT), allows for full-screen text-based interaction, via facilities provided directly by the kernel. Gentoo starts with six virtual consoles by default (this can be configured in inittab or with openrc-init). X can be started in a virtual console from the shell, or from a display manager, in which case X is traditionally shown on virtual console number 7. Keyboard shortcuts are used to switch between VCs, and the command exists if needed.

From a text virtual console, it is possible to access the other VCs by pressing the + through + keys on the keyboard. The key ("Windows" key on some keyboards, other times the Command or "Apple" key) will toggle consoles. To switch to the next or previous VC in numerical order, press + or +.

From an X11 session, the Linux virtual consoles can be accessed with ++ through ++ key combinations.

If the X11 session was started from a session manager, it is often started on tty7. Return to it by pressing ++, otherwise return to the graphical session by going back to the virtual console on which it was started.

Available software
Popular terminal emulators include:

Additional terminal emulators can be found in the category.

Display garbled after binary output
Generally corrupted or garbled output is not caused by the terminal emulator itself, but rather the programming running within the emulator. Often when binary output is displayed into the terminal, the program running inside the terminal will need to refresh the emulator in order for output to be corrected. Refresh is accomplished differently depending on the program.

bash
On occasion the text in the terminal emulator will become garbled. This generally happens if binary output is displayed to standard out (stdout). This can easily be fixed by typing the command.

When using bash, the shell can be cleared and redrawn by pressing + (lower case L).

See the Bash article for more Bash specific features and fixes.

External resources

 * https://www.linusakesson.net/programming/tty/index.php - Detailed history of the TTY.