Linux has a graphical and command line two operations, graphical and windoes similar, here is no longer explained, the following command line
Cli:command Line Interface is the command lines that use the command behavior shell,
Shell is divided into sh (bourn) csh tcsh Ksh (Korn)
Bash (Bourn again shell) GPL zsh
To operate or use the system, you have to command it, type the command directly at the command line, and then press ENTER to execute, submit the command to the system, the system executes, and return the result to the command line,
COMMAND [OPTIONS ...] [ARGUMENTS ...]
Options: One or some of the features used to enable or disable commands;
Short options:-C, for example:-L,-H
Long options:--word, for example:--all,--human-readable
Parameters: The object of the command, such as file name, user name, etc.
Attention:
1, multi-options, and multi-parameter and command separated by using white space characters
2. Cancel and End command execution: CTRL + C, ctrl+d
3. Multiple commands can be used; separate symbols
4, a command can be divided into multiple lines
echo command
Function: Display characters
Syntax: Echo [-nee][string]
Description: Echo will send the input string to standard output.
The output string is separated by a blank character and the last
Change line number on
echo "$VAR _name": variable is replaced, double quotation mark table weak reference
Echo ' $VAR _name ': variable does not replace, strong reference
$echo –e "Enter the file name: \c"
Echo needs to print the escape character using the-e parameter.
-N does not wrap characters at the end of the line
-E If the following characters appear in the string, they are handled in particular, and
does not use it as a general text output:
\a issued a warning sound;
\b Backspace key
\c finally not add the line break symbol;
\ n Wraps and the cursor moves to the beginning of the line;
\ r The cursor moves to the beginning of the line, but does not wrap;
\ t Insert tab;
\ \ insert \ character;
\0NNN insert ASCII character represented by NNN (octal)
Echo-e "\033[43;31mred color\033[0m"
Command line also has a lot of shortcut keys, and command completion, using shortcut keys and command completion can speed up our operations,
CTRL + A: Moves the cursor to the beginning of the command line.
Ctrl+e: Moves the cursor to the end of the life merriness.
Ctrl+u: Deletes the characters from the beginning of the line to the cursor.
CTRL + Z: Sends the current process to the background processing.
CTRL+ALT+F1: Switch to the first text terminal. You can have as many as six different terminals under Linux.
CTRL+ALT+F7: Switch to the first graphical user interface (generally X-window in the seventh terminal)
Command completion
Internal command:
External command: The path defined by bash according to the PATH environment variable, from left to
Right searches each path for a file named after the given command name, the first time a command was found
is the command to execute
The user-given string has only one unique command, which complements the entire
Otherwise, tab again will give the list
Path completion
Use the user-given string as the beginning of the path and specify the parent directory
Searches for file names that begin with the specified string
If only: the direct complement
Otherwise: tab to the list again
History command Usage
History [-c] [-D offset] [n]
HISTORY-ANRW [FileName]
History-ps arg [arg ...]
-C: Empty command history
-D: Deletes the command specified in the history;
#: Show Recent # History
-A: Append the newly executed command history list to the history file for this session
-N: Read unread rows to History list in history file
-r: Read history file attached to History list
-W: Save History list to specified history file
-P: Expands the history parameter into multiple lines, but does not exist in the history list
-S: Expands the history parameter into a row, appended to the history list
Linux Simple operation