Introduction: Linux Philosophy
① All Documents
② Small single-purpose files
③ connecting programs to complete complex programs together
④ avoid confusing user interfaces
⑤ configuration data is stored in text
CentOS File Installation:
Http://mirrors.aliyun.com
Use #md5sun file to derive a value that is consistent with the official release value.
Entry
1. Command structure:
COMMAND OPTION ARGUMENT
Command option Parameters
2. Command prompt
[Email protected] ~]#
Root: User Name
localhost: Host name
~: the current folder; ~ is indicated as the root directory
#: Represented as an administrator user; $ represented as a normal user
3. Command Priority level
Aliases > Internal commands > Cache external > External
4, the Linux variable reference
Reference character name meaning
Any character in single quotation marks as literal meaning
"" in double quotation marks, keep $, ' ', ' function, that is, the translation variable value
' Anti-quote Shell interprets the anti-quote content as a system command
Cases:
1. # echo ' Echo $PATH '
--># Echo $PATH
2, # echo "Echo $PATH"
-->#/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin
3, # echo ' \ \ '
-
#
#echo $ (\ \)
-->bash: \: Command not found ...
#
(PS:"\" is interpreted as an escape character in bash and is used to remove the special meaning of a single character, preserving the literal value of the character following it, in addition to the line break.) )
5. Command
Nano text editing tools
Ctrl+d Login Prompt function
DF Partition Status
Uname Display System Information
Gedit Text Editor
ctrl+alt+f1-6 Character F7 Graphics Centos5
Ctrl+alt+f1 graphic f2-7 character Centos6-。。
CHVT 1-7 Switching interface
StartX graphical interface
Halt power off continuously
Poweroff Power off
Hostname Display host name
Lsb_release Linux Standard Library
Cat/etc/redhat-release Viewing the CentOS configuration
id-u [user name] View user UID
echo $ variable Variable: value
Echo $SHELL
Tar xvf file Extract files
enable-n [command] disable external commands
Date: Displays the system time
Clock: Show Hardware time
Clock-s the system clock, whichever is the hardware clock
-W with system clock, correct hardware clock
Cal: Show Calendar
Nano file:file text Editing
Reset: Reset Desktop Configuration
Create a database
MANBD (CentOS 7)
Makewhatis(CentOS 6)
CENTOS6 Internal Command Help query
Echo: Echoing
In addition to the man Echo, the echo can be used in the Help manual, which also brings back the font color
echo display with color, need to use parameter-E
The format is as follows:
Echo-e "\033[word background color; text color m string \033[0m"
For example:
Echo-e "\033[41;37m Tonyzhang \033[0m"
Where 41 of the position represents the background, 37 of the position is the color of the word
Note:
1, the word background color and the text color is the English "" "
2. There is a m behind the text color
3, before and after the string can have no space, if any, the output is also a space
Here are a few examples:
Echo-e "\033[30m Black character \033[0m"
Echo-e "\033[31m Red word \033[0m"
Echo-e "\033[32m Green word \033[0m"
Echo-e "\033[33m Yellow word \033[0m"
Echo-e "\033[34m Blue word \033[0m"
Echo-e "\033[35m Purple word \033[0m"
Echo-e "\033[36m sky blue Word \033[0m"
Echo-e "\033[37m White character \033[0m"
Echo-e "\033[40;37m Black Bottom White \033[0m"
Echo-e "\033[41;37m Red bottom White \033[0m"
Echo-e "\033[42;37m Green bottom White \033[0m"
Echo-e "\033[43;37m Yellow \033[0m"
Echo-e "\033[44;37m Blue bottom White \033[0m"
Echo-e "\033[45;37m Purple \033[0m"
Echo-e "\033[46;37m sky blue Bottom White \033[0m"
Echo-e "\033[47;30m black character \033[0m on white background"
Control Option Description:
\33[0m Close All Properties
\33[1m Setting High brightness
\33[4m Underline
\33[5m Flashing
\33[7M Reverse Display
\33[8m blanking
\33[30m--\33[37m setting foreground color
\33[40m--\33[47m Set background color
\33[na the cursor to move n rows
\33[NB cursor down n rows
\33[NC cursor right shifts n rows
\33[nd cursor left n rows
\33[Y;XH Setting the cursor position
\33[2J Clear Screen
\33[k clears the contents from the cursor to the end of the line
\33[s Save Cursor position
\33[u Restore cursor Position
\33[?25l Hide Cursor
\33[?25h Display cursor
Echo ' \0nnn ' nnn--and ASCEII code in the corresponding octal code
Linux Notes Collation