5

I know that terminal can be started by Ctrl+Alt+T. But sometime users say about command-line with Ctrl+Alt+F2.

So, Is there any difference in working between them? And when should I use between them?

What is called tty?

7

The virtual terminals (the ones you get to with Ctrl Alt F1-9) go back to the roots of Linux. Remember that Linux was originally a command-line only system and designed for multiple users. The idea was that each user could log into a single tty. This would not happen on the same physical machine of course, think of servers that many computer terminals would connect to. Each user would connect using a different computer and the server log them in to a tty.

This has nothing to do with the tty command which is part of coreutils. The tty command is simply a tool that lets you know the name of the terminal you are currently using.

The "terminal" (actually called a "terminal emulator") is simply a GUI program that mimics the old behavior. It lets you run a shell (bash in the default Ubuntu) from within your X session.

The main point is that both the virtual terminals and the terminal emulators provide you with a command line interface, a shell. They are basically the same thing. The only important difference from a practical point of view is that the terminal emulators run interactive, non-login shells while if you drop into a tty and login there, you will run an interactive, login shell. For more information on the differences between these two types of shell, see here.

I suggest you also read this excellent Q&A on Unix & Linux:

What is the exact difference between a 'terminal', a 'shell', a 'tty' and a 'console'?.

  • 1
    Another important difference is that the VC do not need the graphic system to run, so it's available in case of X11 not working (wrong graphic drivers, errors in startup scripts, etc). – Rmano May 18 '14 at 5:17
  • Thanks, but if "the virtual terminals (the ones you get to with Ctrl Alt F1-9) go back to the roots of Linux", I'm wondering, the terminal goes back to which part of Linux, please ? I'm a little confused – Webwoman Sep 9 '18 at 11:50
  • 1
    @Webman I don't understand what you mean. It might be better to ask a new question, but what I mean here is that these virtual terminals are there because Linux was designed for multi user systems. – terdon Sep 9 '18 at 11:51

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.