Ubuntu – A tty, and how to access a tty

command linetty

I keep hearing about these things known as tty's.

  • what are they

  • how can I access them

  • what do they do?

Best Answer

  • tty is one of those funky Unix commands that prints the name of the terminal connected to standard input.

    TTY's are text-only terminals commonly used as a way to get access to the computer to fix things, without actually logging into a possibly b0rked desktop.

    Related: What is tty7 in the commandline?

    By default Ubuntu has 7 tty's.

    • Up until Ubuntu 17.10, 1-6 are command line only and 7 runs your X session (your normal desktop).
    • On Ubuntu 17.10 and newer, it's GUI login screen on 1, GUI desktop on 2 and command lines on 3-7.

    To access them, use this keyboard shortcut:

    Ctrl + Alt + F1 (or F3 on 17.10 and newer)

    (changing F1 to F1-F6 to access the terminal that you want)

    To get back to your GUI session (the normal desktop):

    Ctrl + Alt + F7 (or F2 on 17.10 and newer)