2

Somewhat new to Linux. Starting out to get into nitty gritty details. See a lot of ttys in /dev. What are they and what do they do? I do know that tty stands for teletype but nothing beyond that.

flashburn
  • 661
  • 1
    A tty is a device corresponding to a terminal (input = keyboard, output = display made of characters, not pixels). A pty is a pseudo-terminal; it acts as a terminal without being an actual one (typical example: a graphic terminal like xterm or gnome-terminal). – xhienne Sep 22 '17 at 01:56
  • Also: https://unix.stackexchange.com/questions/4126/what-is-the-exact-difference-between-a-terminal-a-shell-a-tty-and-a-con – Kusalananda Sep 22 '17 at 06:15

1 Answers1

2

If you are used to using a graphical desktop with a graphical login system, having TTYs is kinda confusing.

But back in the old days (and still on servers etc) we didn't always have X or run X every time we used a computer. Multiple TTYs would let you log in multiple times, running processes under each TTY - of course, the program screen does the same for you now, no TTY needed. TTYs could be attached to serial consoles, etc. as well as trivial things like modems, to allow multiple people to use on machine at one time.

For server use, you can also configure them to display a tail -f'd log file as well as other monitoring output (ie, top etc) instead of just a login message or blanking the screen.

You can still get to them - press ctrl+alt+F1 on your keyboard, and you should switch to a plain console login. Press ctrl+alt+F7 (or maybe F8) to switch back to your X session.

If you are on a really low RAM machine you can disable all but one or two of them to reduce RAM use just a little bit. How depends on what init you are using.

ivanivan
  • 4,955