TTY or Tele Type Writer is a device that is used to provide input into the destination system. TTY is a generic term that is used for different hardware and software for different systems.
First TTYs are created in the 1830s with the name of teleprinters. Teleprinters were hardware devices that are used to get input from the user and send this input into remote locations. Over years different types of TTY are created for different use methods and cases. Modern TTY’s are used with computers in order to input and output them.
TTY devices are used to input and output in a simple matter into a system or computer. While input/output process the data is typed -> encoded -> sent -> received by the destination system -> decoded and printed. There are two types of TTY devices called “Hardware TTY” and “Software TTY“.
Hardware TTY is a hardware device that contains keys and a monitor in order to send input into the remote system and print returned data in the monitor. Between the 1960s and 1990s mainframes are used the hardware TTYs. There are protocols used to transmit data which is input and output between hardware TTY and the remote system. These protocols are DEC VT05, DECVT100, etc.
Software TTY is a software which provides the function of the TTY. Software TTY is a emulator which is used in Linux, Unix and BSD systems to use them like a main frame. Linux provides the tty command.
Linux is the derivative of the Unix operating system. Terminals and hardware TTY was very popular with the Unix operating system. Linux provides the same even more advenced experience with the TTY where it provides the tty tool and console access. Linux tty is a pseudo-teletype which is also called as PTS. The PTS is a device and located under the “/dev/pts”. For example the first TTY is named as “/dev/pts/0“.
We can get the current TTY number and device with the tty command like below.
Open TTY In Silent Mode
The tty provides the silent mode where no output is generated. The -s option is provided for the silent console.
Navigate between TTYs In Linux Console
Linux provides multiple consoles where one or two consoles are GUI simply a desktop environment. Other consoles are TTY consoles which are command-line consoles like below. For example, when we press CTRL+ALT+F3 keys at the same time we will see the following tty console which is named tty3.
Also, numbers from F1 to F7 can be used to get different Linux console. Generally, F1 and F2 provide the desktop environment and other consoles are text-based consoles simply command-line interfaces.
- CTRL+ALT+F1 opens a desktop environment with the login screen.
- CTRL+ALT+F2 open desktop environment with the current desktop.
- CTRL+ALT+F3 open TTY3
- CTRL+ALT+F4 open TTY4
- CTRL+ALT+F5 open TTY5
- CTRL+ALT+F6 open TTY6