Linux Terminal and Console Explained For Beginners

Terminal is the interface through which you type cryptic Linux commands, but is terminal just a window with command prompt on your Linux desktop? Well, the fact is, the terminal you are using now is probably not a real terminal. In this article, I will be explaining the real meaning of Linux terminal and console. Understanding this basic concept is important if you want to master Linux.

Terminal is An Interface Between Human and Computer

As a noun, terminal has many meanings. The Merriam-Webster dictionary gives us a good definition of terminal in the computing field:

a combination of a keyboard and output device (such as a video display unit) by which data can be entered into or output from a computer or electronic communications system.

Human and computer are two independent entities. Human need an interface to put information into the computer and read output from it. These days, input device of personal computers includes: keyboard, mouse, and microphone. Output device includes monitor and speaker. They are commonly called peripheral devices. But in the Unix and Linux world, input and output devices are called terminal. The opposite of terminal is the host, which includes devices like CPU, RAM, HDD and so on.

So now we have two equations.

Computer = Host + Terminal

Terminal = Input device + Output device

The First Terminal

Personal computers came into daily lives in the late 1970s. Before then, we can only use expensive mainframes and minicomputers in big companies or universities. The PDP-7 minicomputer used by Ken Thompson and Dennis Ritchie (The two creators of Unix) cost 72,000 US dollars in 1965, and the GE-45 mainframe cost 10 million US dollars.

Ken Thompson and Dennis Ritchie wanted to make Unix become a multi-user operating system, which means each user would have a terminal to connect to the computer. Each user needs a monitor and keyboard. However, every computer devices, including monitor, were very expensive in those days. And keyboards were physically attached to computers. There was no detachable keyboards then.

So they found an alternate solution: use the cheap ASR33 teletype as terminal. Teletype (TTY) was mainly used to send and receive typed messages in telegraphy, but they can also be used to put information into computer and get information out from it. You use the keyboard to input information and print output on paper.

Linux terminal ASR33

ASR33 Teletype

Many teletypes were connected to one Unix computer. Every user can log into Unix with their own username and password, sitting in front of their own teletypes. So Unix became the first multi-user operating system and ASR33 became the first Unix terminal. Due to this fact, the acronym TTY is commonly used to represent terminal in Unix/Linux.

Over the years, terminals became more and more advanced. In 1970, DEC (Dgital Equipment Corporation) introduced the VT05 video terminal. It has a monitor with a video screen for output.

VT05 video terminal

Character Terminal vs Graphics Terminal

Character terminal is also known as text terminal, which can only output text-based information. Teletypes are character terminals. The most famous character terminal is the VT100 made by DEC in 1978. It’s designed so well that it became a standard for later terminals.

Graphics terminal is better because it can also show graphics/pictures on the screen. The most famous graphics terminal is X Terminal, which provided the basic support for the X window system.

Linux Terminal Emulators

Now you know terminal is hardware. In the 1970s and 1980s, people type commands sitting in front of a real terminal. These days we often type commands in a software terminal, which is better known as terminal emulator or terminal emulation application. Sometimes people call them virtual terminal. They are not real terminals, but the operating system thinks they are.

If you use Gnome terminal, you can run the following command to read the manual of gnome-terminal.

man gnome-terminal

It tells you that gnome-terminal is a terminal emulation application. It emulates Xterm.

gnome terminal is a terminal emulation application

Xterm is also a terminal emulator. It emulates the VT102 terminal made by DEC. Now you can still find Xterm in your Linux distribution.

What is Console?

In the 1970s and 1980s, terminal are often connected to the host by wire, but there’s a special terminal that is attached to the host. This special terminal is called console. It is used by administrators only. Each computer has only one console. There’s not much difference in appearance between standard terminal and the console, but console can do something that standard terminals can not do. For example, if the operating system failed to boot up, there would be error message displayed on the console, but not on other terminals. And if the operating system boots into single-user mode, you can only use console to login. Other terminals have no permission to login in single-user mode.

PDP-7 minicomputer console

PDP-7 minicomputer console

Console and terminal are often seen as synonyms on personal computers. Your monitor and keyboard are the console, and also terminal. You can switch between a standard user and an administrator at any time.

Virtual Console

As a matter of fact, there are two types of terminal emulator. The first type is terminal window you open in a desktop environment. The other type is virtual console. In the 1970s and 1980s, people can often use only one terminal. Heavyweight people in a company or university can use multiple terminals, because they need to do many things with the operating system. So there would be several terminals on their desks.

Nowadays, we don’t need to put multiple terminals on the desk, because Linux can create multiple virtual terminals. One of them is graphics terminal, the other six is character terminal. The 7 virtual terminals are more commonly known as virtual consoles and they use the same keyboard and monitor. Physical console is the combination of your monitor and keyboard. When Linux boots up, it creates the 7 virtual consoles and by default brings you to the graphics console, i.e, the desktop environment. You can run the who command to check which virtual console you are using.

who

linux virtual console

As you can see, I’m using the 7th virtual console (tty 7).  If we want to switch to a character virtual console, simply press Ctrl+Alt+ F1, or Ctrl+Alt+ F2…. Ctrl+Alt+F6. To switch back to the graphics virtual console, press Ctrl+Alt+F7.

When is virtual console useful? If, for some reason, your desktop environment doesn’t respond or the icons/taskbar on your desktop suddenly disappear, you can switch to a character virtual console, and type commands to diagnose the problem.

Note: On Fedora, tty1 is the default graphical virtual console.

What is a Shell

Terminal is just a mechanism to transfer information. For the operating system to understand the information, a shell is needed. A shell in Linux is a program that interprets the commands you enter in a terminal window, so the operating system can understand what you want to do.

There are many shell programs, such as Bash, Zsh, Csh, Ksh etc. Bash is the default shell on most Linux distributions. When you open a terminal window, a Bash shell is automatically started. To check which shell you are using now, run the following command.

echo $0

linux bash default shell

The Distance Between Terminal and Host

Terminals can be directly connected to a host on a laptop computer. Terminals can also be connected to a host by wire like a desktop computer. Actually, terminals can also connect to a host over the network. For example, if you have two computers in a LAN. One of them run Linux. You can use the other computer to log into the Linux computer using SSH, or VNC. Thus, the Linux computer is the host and the other computer is the terminal.

A virtual private server (VPS) running in a data center doesn’t have its own terminal (keyboard or monitor). Hosts without terminals are referred to as headless systems. If you have a VPS running in a data center, you can use SSH to remotely log into the VPS, so your local computer becomes a terminal of the VPS host.

Wrapping Up

I hope this article helped you understand Linux terminals, consoles and shells. As always, if you found this post useful,  subscribe to our free newsletter to get more tips and tricks 🙂

Rate this tutorial
[Total: 50 Average: 5]

12 Responses to “Linux Terminal and Console Explained For Beginners

  • Thanks for the quick summary of these concepts. Although for the most part it’s common knowledge, it was nevertheless useful for me as a novice Linux user to review this again.

  • Cuvtixo D
    4 years ago

    Very good article. I would add, to the explanation of the historical importance of DEC VT100 character-type terminal emulation, the IBM 3270. It was a block mode terminal, a type of computer terminal that communicates with its host in blocks of data, as opposed to a character-oriented terminal (like the VT100) that communicates with its host one character at a time.

    Block mode is also known as “screen-at-a-time mode”. There were other differences, running in a synchronous rather than an asyncrhonous mode, and supporting “escape sequences”, making it an “intelligent” rather than a “dumb terminal”.

    Maybe I’m going into too much detail here, but presenting “X Terminals” as the only example of a graphics terminal really misses a lot of what modern terminal emulators can do now and were built to do in the past.

    • Gabriele
      4 years ago

      Where did you learn all these thigs? Experience? I’m desperate to find resources to delve into this topic

      • cuvtixo
        4 years ago

        being old. lol. I didn’t have direct experience with terminals other than the DEC, but I remember them being out there, other people using them. And I was occasionally using linux back in 1999, when terminal emulators were a lot more important, for connecting to mainframes, for example.
        Actually, a quick glance at Wikipedia reminds me of all the details and sometimes I find reasons to edit the articles while looking up things, which leads me to looking up more things.

  • Very cool! I had no idea you could switch terminals with Ctrl+Alt+F1,2 ect! That will be VERY handy in the future 😀

  • Hi

    Could you do a article on conky and other Linux docks , Windows mangers so one can make Linux look nicer.

  • Faruq Liman
    4 years ago

    It’s so great to hear that… Really appreciate your efforts @LinuxBabe
    We wish to here more on SHELL’s

    Thanks

  • Thank You So Much for this Awesome Article.
    Keep on track as such in-depth explanations of other interesting topics in Linux.
    Please…Thanks Again Sir.

  • Antonio
    2 years ago

    Very useful, thanks for share your knowledge!

  • This is a phenomenal description of the terms I have been having so much difficulty differentiating like terminal, console, emulator, etc. Really great, thanks!

  • Thank you for a great article. I noticed in the graphic of your console when you typed and entered ‘who’ the output is tty7. I’m wondering how that is. Ctl-Alt-F1 to F6 once login and password entry succeeds, and ‘who’ is enter on each terminal, the output is tty1 thru tty6. Using shell in emacs the output is :1. Ctl-Alt-F7 returns to login/password for desktop console. How is tty7 accessed?

  • Geek speak

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here