Linux Terminal and Console Explained For Dummies

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) costs 72,000 US dollars then, and the GE-45 mainframe costs 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 the 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 boot 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.

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

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: 32 Average: 5]

7 Responses to “Linux Terminal and Console Explained For Dummies

  • 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
    1 week 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
      8 hours ago

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

      • cuvtixo
        2 mins 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
    5 days ago

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

    Thanks

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.