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.