Ubuntu: What is a tty, and how do I access a tty? (3 solutions!)

preview_player
Показать описание
Ubuntu: What is a tty, and how do I access a tty?

The Question: I keep hearing about these things known as tty's.
* what are they
* how can I access them
* what do they do?

Solutions Sample (Please watch the whole video to see all solutions, in order of how many people found them helpful):

== This solution helped 57 people ==
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.
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)

== This solution helped 3 people ==
You can change the displayed TTY by commmand line with chvt (requires sudo
privileges), from SSH for example. Here is the relevant part of the manpage
(man chvt):
CHVT(1)
NAME
chvt - change foreground virtual terminal
SYNOPSIS
chvt N
DESCRIPTION
The command chvt N makes /dev/ttyN the foreground terminal. (The
corresponding screen is created if it did not exist yet. To get rid
of unused VTs, use deallocvt) The key combination (Ctrl-)LeftAlt-FN
(with N in the range 1-12) usually has a similar effect.

Рекомендации по теме