Differences and connections between terminal, shell, tty, console, and bash

1. Terminal (termimal) = tty (Teletypewriter, teletype printer), which is used to provide an input and output environment for a command. Under linux, use the key combination ctrl+alt+T to open the terminal. It can be considered that terminal and tty are synonyms;

2. The shell is a command line interpreter. When you open a terminal, the operating system associates the terminal with the shell. When we enter a command in the terminal, the shell is responsible for interpreting and executing the command;

3. In the early days of computer development, there was usually a panel on the exterior of the computer. The panel contained many buttons and indicator lights. The panel could be used to manage the bottom layer of the computer, and the indicator lights could be used to know the running status of the computer. This The panel is called console. On modern computers, some log information is printed on the screen when the computer is turned on (such as ubuntu), and these log information is output on the console. A computer has only one console, but can have multiple terminals. For example, a certain area on the TV generally has some buttons, such as power on, volume adjustment, etc., this area can be used as a console, and there is only one area on the TV, the remote control can be analogous to a terminal, the terminal can have multiple.

4. There are many different shells on the linux system. The more common ones are Bourne shell (sh), C shell (csh) and Korn shell (ksh). All three shells have their advantages and disadvantages. The author of the Bourne shell is Steven Bourne. It is the original UNIX shell and is available on every UNIX. The whole process of bash is called Bourne Again shell. It can be seen from the name that bash is an extension of Bourne shell. bash is fully backward compatible with Bourne shell, and many features have been added and enhanced on the basis of Bourne shell, such as command completion, command Editing and command history table and other functions, it also contains many advantages of C shell and Korn shell, flexible and powerful programming interface, and a very friendly user interface. All in all, bash is a type of shell, an enhanced shell.

 

refer to:

1、https://www.zhihu.com/question/21711307

2、https://blog.csdn.net/wenlifu71022/article/details/4069929

3、https://www.zhihu.com/question/20388511

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324743495&siteId=291194637