Article Title: Basic Concepts and Common commands of Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
I accidentally searched for LINUX and found many LINUX concepts and Common commands on the Internet. I sorted them out for your reference.
What is a Linux terminal?
The keyboard is also called a terminal, or a console. the I/O device of a computer is a physical console; using software on a machine to implement a console interface that does not interfere with each other and works independently in multiple townships is to implement multiple virtual consoles. There are six Linux virtual consoles. If you select x window directly, x window will be on the 7th virtual terminals. On the Character operation console interface in Linux, you can switch to another console by using the combination key Alt + (F1-F6. In the image user interface, you can switch to the character console by pressing Ctrl + Alt + (F1-F6). Each console is a completely independent session in the system and can be used by different users at the same time. The virtual console makes Linux a multi-user operating system. This multi-console feature is different from multiple desktops in Windows. In Linux, each console can be controlled by different users. For example, you may log on as root in console 1 and on console 2 as yifan. The two consoles run different programs in their respective user spaces. If you are in graphic mode, you can open a terminal to enter the console window. Usually there are terminal buttons on the task bar on the desktop. You can also open the terminal from the context menu (right-click on the desktop.
What is shell?
Shell is a system user interface that provides interfaces for users to interact with the kernel. The user can input commands on the keyboard to operate the computer, and then display the execution result to the user. Shell user interface, also known as the character operation interface. Shell is a command interpreter and has its own built-in shell command set. In addition, shell can also be called by other effective Linux utilities and applications (utilities and application programs) in the system. How does shell execute the command explanation? shell first checks whether the command is an internal command. If not, it checks whether it is an application. The application here can be a utility of Linux itself, for example, ls and rm can also be purchased commercial programs, such as xv or public domain software, just like ghostview. then shell tries to find these applications in the search path. The search path is a list of directories where executable programs can be found. If the command you typed is not an internal command and the executable file is not found in the path (a friend who has learned DOS must have a good understanding of the meaning of Internal and External commands) an error message is displayed. If the command is successfully found, shell internal commands or applications will be decomposed into system calls and passed to the Linux kernel.
Shell Type
Currently, popular shells include bash, ksh, and csh.
Bash is the default Shell used in Linux. It is jointly completed by Brian Fox and Chet Ramey. It is short for Bourne Again Shell and has a total of 40 internal commands. Linux uses it as the default Shell because it has the following features:
(1) You can use a function similar to doskey under DOS, and use the up and down arrow keys to view and quickly enter and modify commands.
(2) The command starting with a string is automatically provided by searching for matching.
(3) It includes its own help function. You only need to enter help at the prompt to get the help.
Ksh is short for the Korn Shell. It is written by Eric Gisin and contains 42 Internal commands. The biggest advantage of this Shell is that it is almost completely compatible with the commercial release version ksh, so that you can try the performance of the commercial version without spending money to buy the commercial version.
Csh is a large Linux kernel. It is compiled by a total of 47 authors represented by William Joy and contains 52 Internal commands. This Shell actually points to a Shell like/bin/tcsh, that is, csh is actually tcsh.
Here, I will introduce common Linux commands, mainly bash commands.
Bash mainly supports three wildcards:
* Match any character and any number of characters
? Match any single character
[……] Match any single character contained in brackets
Some also support-, which indicates the character range. For example, [a-h] indicates any character from a to h.
The common syntax of bash commands is as follows: command name "option" parameter 1 "parameter 2 」...... An option is a special definition of a command. It starts with a minus sign (-). Multiple options can be connected with a minus sign, for example, ls-l-a is the same as ls-la. "Parameter" provides the command running information or the file name used during command execution. You can use semicolons (;) to separate two commands, so that multiple commands can be entered in one line. The command execution sequence is the same as the input sequence. Some parameters also start. Commands, options, and parameters can be separated by spaces or tabs.
Bash command
You can press the key at any time when the command is sent. In this case, the system will try to complete the commands that have been entered. If the entered string is insufficient to uniquely identify the command that should be used, the system sends a warning. Press the button again, and the system will provide a list of strings that can be used to complete. The command complementing function makes sense to improve the usage of long commands or operations on files or folders with long names.
History commands
The system will remember the commands that have been input in the past. As long as you press the up and down arrows in the arrow keys, you can select the commands that have been input before.
Online Help
You can use the man command to view the online help information of any command. It uses the command name as a parameter. The syntax format of this command is man "command name". After any command, you can give the -- help parameter and display the help information of this command.
Linux Files and file types are similar to DOS and WIN files. We will not introduce them here. Note that LINUX File names are case sensitive.
[1] [2] [3] [4] Next page