Linux Basic Concepts
Terminal equipment is divided into three kinds: physical terminal, virtual terminal, analog terminal.
Physical Terminal: A monitor and keyboard device that connects directly to the host.
Device file path:/dev/console
Virtual Terminal: A terminal that is attached to the physical terminal as a virtual implementation in software form. A graphical terminal is also included in the virtual terminal.
Graphical Terminal: A terminal that is attached to a virtual terminal in the form of software to provide a desktop environment. Device file path:/dev/tty#
650) this.width=650; "src=" Https://s1.51cto.com/wyfs02/M00/97/80/wKiom1ku6_XTpJSKAAACr9pTyys395.png "title=" 2.png "alt=" Wkiom1ku6_xtpjskaaacr9ptyys395.png "/>
Analog Terminal: a command window opened in the graphical interface, using SSH or a telent remote connection open Interface
Device file path:/dev/pts/#
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/97/81/wKioL1ku666DNpAwAAAFB51hvRE824.png "title=" 1.png "alt=" Wkiol1ku666dnpawaaafb51hvre824.png "/>
The terminal is the device that the user interacts with the host and must use.
View current terminal devices: TTY
Interactive interface: After starting the terminal, attaching an interaction on the end device is the application
The interactive interface is divided into two types: 1,gui: Graphical user interface
2,CLI: Text interface (character interface)
[[email protected]~]#, divided into two parts.]
1, [[email protected]~]:P S1
2, the command prompt (prompt) is divided into two types, namely #, $
1) #, run as Administrator.
2) $, run in normal user mode.
Show all shells under the current system:
At the command prompt (#) Cat/etc/shells
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M02/97/80/wKiom1ku5WSyj5V4AAAJAE3B-SI709.png "title=" 5.png "alt=" Wkiom1ku5wsyj5v4aaajae3b-si709.png "/>
This diagram shows that all sh, bash, nologin, Dash, tcsh, csh are present in the system.
Displays the currently used shell:
At the command prompt (#), Echo ${shell}
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M01/97/80/wKiom1ku5IGzrGWwAAAF7FUiy9o197.png "title=" 4.png "alt=" Wkiom1ku5igzrgwwaaaf7fuiy9o197.png "/>
This figure shows that the shell used before is bash.
Run command: Draw the shell program to find the executable program or code corresponding to the typed command and parse it and submit a kernel allocation resource to run it: it behaves as one or more processes.
There are two types of commands that can be executed in the shell: 1. Built-in Commands 2. External commands
1. Built-in command: The shell comes with, and is provided in a command form. Internal commands are executed very quickly. This is because no other process has been created because of the execution of this command.
2. External command: In the current system of a file system path has a corresponding executable program file: You can use the which, Whereis command to view the path.
Distinguish internal or external commands: #type
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/97/81/wKioL1ku6TzALy1pAAAF-L3NVU4127.png "title=" 6.png "alt=" wkiol1ku6tzaly1paaaf-l3nvu4127.png "/> This diagram shows that the CD is a built-in command.
650) this.width=650; "src=" Https://s5.51cto.com/wyfs02/M01/97/80/wKiom1ku6q_gkzB_AAAHUDI8X0g586.png "title=" 6.png "alt=" Wkiom1ku6q_gkzb_aaahudi8x0g586.png "/> This figure shows that the TTY is an external command.
To run the command:
Command format:
COMMAND [OPTIONS ...] [ARGUMENTS ...]
Command: Commands
Options: Option
ARGUMENTS: Parameters
Options: 1. Some features to enable or disable commands.
2. Options are divided into long options and short options.
Short options:-one character (c) For example-l,-h
Multiple short options can be combined using: For example-l–h, can be written as-lh
Long options:--a word (word) such as-long,--human-readable
Parameters: The object of the command, providing data to the command:
The command itself is written on the leftmost side, and the command itself is an executable binary program or
Built-in commands from the shell.
Attention:
1. Multi-option and multi-parameter and command should be separated with white space characters
2. Cancel command execution: Ctrl + C
This article is from the "10968272" blog, please be sure to keep this source http://10978272.blog.51cto.com/10968272/1931512
Linux Basic Concepts (1)