In Ubuntu releases before 17.10 Ubuntu has 6 virtual consoles tty1-tty6 which are accessed by the keyboard combinations Ctrl+Alt+F1 to Ctrl+Alt+F6. To access the GUI from any virtual console press the keyboard combination Ctrl+Alt+F7.
Starting with Ubuntu 17.10, which allowed the user to select either Xorg or Wayland when logging in, the virtual consoles are accessed by the keyboard combinations Ctrl+Alt+F3 to Ctrl+Alt+F6. To access the GUI from any virtual console press the keyboard combination Ctrl+Alt+F2.
/dev/tty
is the controlling tty of the current process, for any process that actually opens this special file. It isn't necessarily a virtual console. For example running the command echo hello > /dev/tty
in the terminal returns hello
, but running sudo echo hello > /dev/tty0
to sudo echo hello > /dev/tty7
returns an error message similar to bash: /dev/tty0: Permission denied
getty, short for "get tty", is a Unix program running on a host computer that manages physical or virtual terminals (TTYs). When it detects a connection, it prompts for a username and runs the 'login' program to authenticate the user.Wikipedia On most Debian systems tty7 is used by the X Window System, so if you want to add more getty's go ahead, but skip tty7 if you run X.
/dev/tty7
”? – Stephen Kitt Nov 30 '18 at 13:59/dev/pts/2
is built upon/dev/tty7
in "the chain of interaction" at https://unix.stackexchange.com/a/229598/674. I am not sure what you think is correct. – Tim Nov 30 '18 at 14:05/dev/tty7
but directly? – Tim Nov 30 '18 at 14:39/dev/tty7
(or any other terminal device) but by managing the input and output devices directly. – Stephen Kitt Nov 30 '18 at 14:55/dev/tty7
, I guess/dev/tty7
must be involved somehow between my terminal emulator window and my physical terminal (my display, keyboard, touchpad)? – Tim Nov 30 '18 at 15:04/dev/tty7
; you’re running X or Wayland on the seventh virtual console./dev/tty7
’s involvement is mostly limited to ensuring that nothing else can grab the seventh virtual console; input and output don’t go through it. – Stephen Kitt Nov 30 '18 at 15:15TIOCSCTTY
ioctl
). The kernel only allows one session group to be controlled by a given terminal (although it’s possible to steal a controlling terminal). – Stephen Kitt Nov 30 '18 at 16:19/dev/tty7
”, to which I replied “you’re not running Ubuntu on/dev/tty7
; you’re running X or Wayland on the seventh virtual console”. That’s all. – Stephen Kitt Dec 03 '18 at 14:16