A terminal emulator, terminal application, or term, (sometimes also referred to as a tty) emulates a video terminal within another display architecture (e.g. in 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 show either a login prompt on a virtual console, by default, or a display manager if one has been set up. 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).
From a text virtual console, it is possible to access the other VCs by pressing the Alt+F1 through Alt+F6 keys on the keyboard. The super 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 Alt+← or Alt+→.
When using a X11-based environment served by the X.Org server, X11 a can be started in a virtual console from the shell or by using a display manager. When a display manager is used, an X11 session is traditionally shown on virtual console number 7. Keyboard shortcuts are used to switch between VCs, and the chvt command exists if needed.
From an X11 session, the Linux virtual consoles can be accessed with Ctrl+Alt+F1 through Ctrl+Alt+F6.
If an X11 session was started from a session manager on virtual console number 7, return to it by pressing Ctrl+Alt+F7, otherwise return to a graphical X11 session by going back to the virtual console on which it was started.
Popular terminal emulators include:
|GPU-accelerated terminal emulator.
|A modern, hackable, featureful, OpenGL-based terminal emulator written in Python and C.
|The default terminal emulator for KDE / Plasma.
|The default terminal emulator for GNOME.
|Drop-down terminal emulator for GNOME.
|The standard terminal emulator of LXDE.
|Light in resource usage, fast, and more feature-rich (tabs, transparency, Unicode, etc.).
|Simple terminal implementation for X.
|A terminal emulator arranging multiple terminals in one window, Python based, for GNOME.
|The default terminal emulator for Enlightenment.
|A drop down terminal, similar to the consoles found in first person shooters.
|The default terminal emulator for the Xfce desktop environment.
|The default terminal emulator for X.org.
|Quake-style (drop-down) terminal emulator based on Konsole for KDE / Plasma.
Additional terminal emulators can be found in the x11-terms category.
In many applications, pressing Ctrl+z will suspend the process and return to the shell. Then, the bg command can be used to continue the process in the background. This may be useful for example, for running a command in a shell while in text editor. In many shells, the fg command will return to the suspended task, and jobs will list current background jobs.
In many shells, appending an "&" symbol to a command will start the command directly in the background.
Some actions can leave a terminal in a state unadapted to the normal display of text. For example, if binary information is output to the terminal (say with cat, or less), some of the data can be interpreted as control characters and modify the terminal's state. Another example would be a program dying and leaving the terminal in an abnormal state.
The problem can usually be fixed by typing the reset command.
Some shells can be cleared and redrawn by pressing ctrl+l (lower case L). Pressing ctrl+c a few times can, in cases, help somewhat. Another option is to use the "stty sane" and "tput rs1" commands.
Sometimes, the visual feedback of typing characters may be affected, even though typing the reset command still works.
The file command can be used to determine a file's type, to try to avoid outputting binary to a terminal in the first place. The od command or a hex editor can be useful to view binary files.
If using the cat command simply to view the contents of files, a pager, such as less may avoid issues.
- Key repeat rate — controls how quickly a key press on the keyboard will repeat if the key is pressed and held for a period of time.
- Recommended tools — lists system-administration related tools recommended for use in a shell environment (terminal/console)
- Pagers — lists system-administration related tools recommended for use in a shell environment (terminal/console)
- Shell environment tools — lists system-administration related tools recommended for use in a shell environment (terminal/console)
- Terminal multiplexers — lists system-administration related tools recommended for use in a shell environment (terminal/console)
- Shell — command-line interpreter that offers a text-based interface to users.
- https://www.linusakesson.net/programming/tty/index.php - Detailed history of the TTY.