"Turn" console, terminal, Tty,shell and other concepts of the difference

Source: Internet
Author: User

Transferred from: http://www.2cto.com/os/201403/282583.html

Http://blog.sina.com.cn/s/blog_bcdac52b0101i2r1.html

Differences in concepts such as consoles, terminals, Tty,shell, etc.

The use of Linux has been for some time, but it has not been understood the differences between the concepts. Although it has been used, but a lot of concepts are vague, so flattening out state is really unpleasant. These concepts are clarified below.

These concepts themselves have a very strong historical atmosphere, with the development of the times, their meanings are also changing, some of them have lost their original meaning, but their names have been preserved.

Control Console (console)

The console is a physical device that is used for input and output, which is directly connected to the computer and is part of a computer system. The computer output information is displayed on the console, such as the output of the BIOS, the output of the kernel.

Linux endpoints, also known as virtual consoles, are the standard features that Linux inherits from UNIX. The display and keyboard are called terminals because they can control the system, so it is called the console, and the input/output device of a computer is a physical console. If the method of software on a computer realizes a plurality of non-interference, independent work of the console interface, is the realization of a number of virtual consoles. The Linux terminal uses the character command line method to work, the user through the keyboard input command, through the Linux terminal to control the system.

Terminal (Terminal)

The terminal (Terminal) is also a physical device that is only used for input and output and does not have strong computational power in itself. A computer has only one console, in the era of computing resources tense, people want to share a computer, you can connect to the computer through the terminal, the command input terminal, the terminal to the computer, the computer completes the instruction, the output is transmitted to the terminal, the terminal will display the results to the user.

Virtual consoles (Virtual Console), Terminal

Virtual consoles and virtual terminals are the same. We only have one terminal (physical device), which is the user interface between us and the computer. If one day, we want to have a number of user interface, then, on the other hand, we can add more terminals (physical devices), on the other hand, can also be on the same terminal (physical device) virtual out of multiple terminals, they do not affect each other, at least, does not seem to affect each other. These terminals are virtual terminals.

In Ubuntu, when we press CTRL+ALT+FX, we will enter the X virtual Terminal, a total of seven virtual terminals, of which the seventh virtual terminal, is our default use of the graphical user interface.

Terminal Simulator (Terminal Emulator)

We know that the terminal is a physical device, and the terminal emulator (Terminal Emulator), is a program that is used to simulate physical terminals. The terminal emulator in the graphical user interface is generally called the terminal window (Terminal windows), and the gnome-terminal that we open under Ubuntu belong to this category.

Tty

The full name of the TTY is Teletypewriter, which is an early endpoint (physical device) that is used to send data to the computer and print out the results of the computer's return. When the display appears, the terminal no longer prints the results, but displays them on the display. But the name of the TTY was preserved.

In Ubuntu, when we press CTRL+ALT+F1, we enter the 1th virtual terminal, and you can see the tty1 displayed above the screen.

Shell

The shell is quite different from the previous concepts, with several concepts related to the input and output of the computer, and the shell being related to the kernel. The kernel provides a lot of services for top-level applications, and the shell is on the upper level of the kernel, below the application. For example, you write a Hello world program, you do not have to explicitly create a process to run your program, you put the written program to the shell, the shell is responsible for your program to create a process.

When we enter a command in a terminal emulator, the terminal emulator itself does not explain the execution of these commands, it is only responsible for input and output, and the actual explanation for executing these commands is the shell.

The SH, bash, and csh that we normally use are different implementations of the shell.

    • The concept of sh sh itself is ambiguous, it can refer to the shell program name, also represents the implementation of the shell.

      The Thompson shell is the first Unix shell, introduced by Ken THOMPSO in the first version of Unix in 1971, and the shell's program name is SH. The Bourne shell, an alternative to the Thompson Shell, was introduced by Stephen Bourne in the seventh edition of Unix in 1977, and its program name is SH. The Bourne shell is not just a command interpreter, but also a programming language that provides program control capabilities that Thompson Shell does not have, and with Brian W. Kernighan and Rob Pike the UNIX programming ENV Ironment is famous for its publication.

    • CSH csh, all called C Shell, was completed by Bill Joy in the late 70, when he was a graduate student at the University of California, Berkeley. TCSH is an upgraded version of CSH. Unlike SH, CSH's shell script, syntax is close to the C language.

    • Bash Bash, the free software developed by Brian Fox for the GNU Project, was released as a replacement for the Bourne Shell in 1989. is the default shell for Linux and Mac OS x. Bash's command syntax is a superset of the Bourne shell command syntax, drawing on some ideas from Ksh and csh.

"Go" console, terminal, Tty,shell and other concepts of the difference

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.