[#unxconsl]:

Unix terminals/consoles

Multiple Terminals

This particular topic, about multiple terminals, is mainly meant for someone who has a keyboard plugged directly into the computer. This can also be used for virtual machines, but typically is not useful when using a remote access method (like an SSH client) to control a physical machine.

Usually, Unix is started in multi-user mode. When in this mode, people can switch terminals. When a graphical user interface is running, it will typically use one terminal. Every terminal, except for the one using a graphical interface, will typically provide a text mode login prompt. A user may then use that terminal to log in, and be provided with a shell.

Often, switching terminals is as easy as holding the Alt key, and then pressing one of the numeric function keys (e.g. pressing Alt-F2). If that does not switch terminals (which may be extra likely if the X Window System is currently being displayed), try holding the Ctrl key as well. e.g.: Alt-Ctrl-F2.

The first terminal is often special. Certain messages may appear on the first terminal. These may include detection of USB hardware, or kernel panic messages and interaction. For this reason, it may often be nice to switch to a second terminal.

The terminals may be defined by the /etc/ttys file. One of the terminals (e.g. ttyC4 in OpenBSD's /etc/ttys file) may be set to “off”. That may be because the terminal is reserved for use by the X Window System. The ttyC0 is related to the F1 key, the ttyC1 is related to the F2 key, the ttyC2 is related to the F3 key, and so on, so the ttyC4 is related to the F5 key. Sure enough, in OpenBSD, pressing Alt-F5 will get back to the terminal running the X Window System (if the X Window System is running).

(Speculation: it appears that there may be other approaches. Perhaps: Another approach to adding terminals may be to use the wsconscfg command (and/or /etc/wsconsctl.conf) or wsconsctl.)

There is often little reason to not add more terminals. (The only reason might be that the available but unused terminals use miniscule amounts of resources, like RAM.) Editing the /etc/ttys file may provide even more terminals.

Scrollback

This particular topic, about the local scrollback buffer, is mainly meant for someone who has a keyboard plugged directly into the computer. This can also be used for virtual machines, but typically is not useful when using a remote access method (like an SSH client) to control a physical machine.

Pressing “Page Up” may scroll back. Or, it might be interpreted as a tilde (especially if at the command prompt). In that case, try pressing Shift-Page Up.

Copy and Paste

One method may be to use a remote access client, if the remote access client supports some sort of copy/paste mechanism.

Another option may be to use a “terminal multiplexing” program.

Another option may be to use a mouse, combined with “ wsmoused ”. (The OpenBSD/i386 Manual Page for wsmoused states, about OpenBSD's version as well as the version from the FreeBSD project; “Both inherit code from the XFree Project.” Additional documentation is at NetBSD: Console drivers.)

[#trmltplx]: Terminal Multiplexing

See: Terminal Multiplexing.