This is the 26th day of my participation in the genwen Challenge

Virtual Console

The I/O device of a computer is a physical console; If in a computer with the method of software to achieve a number of non-interference independent work console interface, it is to achieve multiple virtual console; The Linux terminal works in character command line mode. Users can use the Linux terminal to control the system by entering commands on the keyboard.

Linux terminal

Linux terminal is actually an interface between the user and the operating system. Users interact with the operating system through the terminal. Linux terminal includes Shell character interface terminal, graphical interface terminal and other user interface terminal;

shell

What is a shell

Shell is an indirect interface between the user and the Linux system. It allows the user to input the command to be executed to the operating system and return the execution result. In Linux, there are multiple shells, multiple shells are available, and a user can only use one Shell at a time.

Shell types:

  • Ash: Is a Shell developed by Bell LABS. BSH is a symbolic link to Ash.
  • Bash: is the GNU Bourne Again Shell, the default Shell on the GNU operating system. Sh and bash2 are symbol links to it.
  • TCSH: Berkeley UNIX C Shell. CSH is a symbolic link to it.
  • KSH: The syntax of Korn Shell is the same as that of Bourne Shell, and it has the easy-to-use features of C Shell.
  • ZSH: An enhanced version of Korn Shell with many of the features of bash Shell.

GNU tools use bash. Bash is installed as /bin/sh by default. On most Linux distributions, the Shell program /bin/sh is actually a link to the program /bin/bash

CHSH -s /path/to/ SHELL username # Change SHELL /bin/bash --version # Check the version of bashCopy the code

Basic format of Shell commands

Command name [options] < Parameter 1> < Parameter 2>……

Functions & Features

  • Command automatic completion (TAB key)

Under the two TAB

  • Viewing historical records (up and down keys on the keyboard)

Scroll up and down the history and type command/CTRL + R

  • Shell prompt (#, $)

# : command prompt for super administrator root

$: command prompt of another user

  • I/O redirection (>, >>, <)

Every program executed in Linux has input, output, and error output; All devices in Linux exist as files (keyboard, mouse, monitor…). ; Three file descriptors are automatically opened when the system starts