Alias, clock, simple commands, bash shortcut keys, help
Alias definition aliases
Defines the alias name, which is equivalent to executing the command value
Alias Name= ' VALUE '
1650) this.width=650; "Src=" https://s2.51cto.com/oss/201711/20/6677cb588a130aa749a64bbc8a6c6527.png-wh_500x0-wm_ 3-wmp_4-s_284964917.png "title=" 2017-11-20_131418.png "alt=" 6677cb588a130aa749a64bbc8a6c6527.png-wh_ "/>
Aliases defined on the command line, valid only for the current shell process
If you want to be permanently valid, define it in the configuration file
For the current user only: ~/.BASHRC
2650) this.width=650; "Src=" https://s4.51cto.com/oss/201711/20/54009b57f2573baf037e9e6f72cbabee.png-wh_500x0-wm_ 3-wmp_4-s_2234081372.png "title=" 2017-11-20_125317.png "alt=" 54009b57f2573baf037e9e6f72cbabee.png-wh_ "/>
Valid for all users:/ETC/BASHRC
3650) this.width=650; "Src=" https://s3.51cto.com/oss/201711/20/d492211191df0dcd453ddc3dbd9a2448.png-wh_500x0-wm_ 3-wmp_4-s_1185055138.png "title=" 2017-11-20_131525.png "alt=" D492211191df0dcd453ddc3dbd9a2448.png-wh_ "/>
Undo Alias: Unalias
UNALIAS[-A] name [name ...]
-A cancels all aliases
4
650) this.width=650; "Src=" Https://s1.51cto.com/oss/201711/20/e610083456c45517c0b61bad11c638de.png-wh_500x0-wm_3 -wmp_4-s_3950920477.png "style=" Float:none; "title=" 2017-11-20_131525.png "alt=" E610083456c45517c0b61bad11c638de.png-wh_ "/>
Two types of clocks for Linux
System clock: Run by the Linux kernel through the CPU's operating frequency
Hardware clock: Motherboard
Related commands
Date display and set system time
5650) this.width=650; "Src=" https://s1.51cto.com/oss/201711/20/792c4480168dc8a10aea021a6c3df975.png-wh_500x0-wm_ 3-wmp_4-s_1669880096.png "title=" 2017-11-20_131558.png "style=" Float:none; "alt=" 792c4480168dc8a10aea021a6c3df975.png-wh_ "/>
Date +%s
6650) this.width=650; "Src=" https://s4.51cto.com/oss/201711/20/bc0f2badd6ae4d3576114d18afc50725.png-wh_500x0-wm_ 3-wmp_4-s_1357166574.png "title=" 2017-11-20_131610.png "style=" Float:none; "alt=" Bc0f2badd6ae4d3576114d18afc50725.png-wh_ "/>
Date-d @1509536033
7650) this.width=650; "Src=" https://s4.51cto.com/oss/201711/20/b2ab0f3080b56aafaab2d2ddfc659402.png-wh_500x0-wm_ 3-wmp_4-s_1684727567.png "title=" 2017-11-20_131617.png "style=" Float:none; "alt=" B2ab0f3080b56aafaab2d2ddfc659402.png-wh_ "/>
Hwclock,clock: Display Hardware clock
8650) this.width=650; "Src=" https://s4.51cto.com/oss/201711/20/14e271f039b02ce68e59623ae96697f7.png-wh_500x0-wm_ 3-wmp_4-s_2086543588.png "title=" 2017-11-20_131629.png "style=" Float:none; "alt=" 14e271f039b02ce68e59623ae96697f7.png-wh_ "/>
-S,--hctosys to calibrate the system clock, whichever is the hardware clock
-W,--SYSTOHC to calibrate the hardware clock, whichever is the system clock
Time zone:/etc/localtime
Show Calendar: Cal–y
9650) this.width=650; "Src=" https://s2.51cto.com/oss/201711/20/6495e049e36f98986c89052d35a56774.png-wh_500x0-wm_ 3-wmp_4-s_2425895213.png "title=" 2017-11-20_131803.png "alt=" 6495e049e36f98986c89052d35a56774.png-wh_ "/>
Simple command
Shutdown: Halt, Poweroff
Restart: reboot
-F: Force, do not call shutdown
-P: Power off
Shutdown or restart: shutdown
shutdown [OPTION] ... Time [MESSAGE]
-r:reboot
-h:halt
-c:cancel
Time: No designation, default equivalent to +1
Now: Immediately, equivalent to +0
+m: Relative time notation, a few minutes later
10
650) this.width=650; "Src=" Https://s2.51cto.com/oss/201711/20/3daa8c58138af7efbb4d16f286398246.png-wh_500x0-wm_3 -wmp_4-s_291742331.png "style=" Float:none; "title=" 2017-11-20_131814.png "alt=" 3daa8c58138af7efbb4d16f286398246.png-wh_ "/>
HH:MM: Absolute time indication, specify time
11650) this.width=650; "Src=" Https://s4.51cto.com/oss/201711/20/27a67039066f90868a9f78f846c26271.png-wh_500x0-wm _3-wmp_4-s_297798969.png "title=" 2017-11-20_131823.png "style=" Float:none; "alt=" 27a67039066f90868a9f78f846c26271.png-wh_ "/>
User login Information View command:
WHOAMI: Displays the currently logged in active user
12650) this.width=650; "Src=" Https://s3.51cto.com/oss/201711/20/e16d2cc7b5328ee5045b8ecdedcc57ba.png-wh_500x0-wm _3-wmp_4-s_3589361761.png "title=" 2017-11-20_131831.png "style=" Float:none; "alt=" E16d2cc7b5328ee5045b8ecdedcc57ba.png-wh_ "/>
Who: All current logon sessions for the system
13650) this.width=650; "Src=" Https://s3.51cto.com/oss/201711/20/6858cde9e0e9cb74f0391b4efd47a710.png-wh_500x0-wm _3-wmp_4-s_3874365807.png "title=" 2017-11-20_131838.png "style=" Float:none; "alt=" 6858cde9e0e9cb74f0391b4efd47a710.png-wh_ "/>
W: All current logon sessions and actions made by the system
14
650) this.width=650; "Src=" Https://s5.51cto.com/oss/201711/20/cac302b4ff8cdc2c20af493b6c6f8e8b.png-wh_500x0-wm_3 -wmp_4-s_2798945948.png "style=" Float:none; "title=" 2017-11-20_131954.png "alt=" Cac302b4ff8cdc2c20af493b6c6f8e8b.png-wh_ "/>
Vnano text Editing
15650) this.width=650; "Src=" Https://s5.51cto.com/oss/201711/20/e49c5fa2da7f3ab99e52d265dcff66d7.png-wh_500x0-wm _3-wmp_4-s_3696311160.png "title=" 2017-11-20_132004.png "style=" Float:none; "alt=" E49c5fa2da7f3ab99e52d265dcff66d7.png-wh_ "/>
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 white space character, and a newline number is added at the end
Options:
-E (default) does not support \ Interpret feature
16
650) this.width=650; "Src=" Https://s3.51cto.com/oss/201711/20/956d73c83cb4a943b36ff1ec57160572.png-wh_500x0-wm_3 -wmp_4-s_999744710.png "style=" Float:none; "title=" 2017-11-20_132016.png "alt=" 956d73c83cb4a943b36ff1ec57160572.png-wh_ "/>
-N Not wrap line
17650) this.width=650; "Src=" Https://s3.51cto.com/oss/201711/20/2beca87aa59565c1fd53a488f749e392.png-wh_500x0-wm _3-wmp_4-s_3492196443.png "title=" 2017-11-20_132024.png "style=" Float:none; "alt=" 2beca87aa59565c1fd53a488f749e392.png-wh_ "/>
-e enable \ character interpretation function
Show variables
echo "$VAR _name" variable is replaced with weak reference
Echo ' $VAR _name ' variable does not replace, strong reference
Bash's shortcut keys
Ctrl+l Clear Screen
Ctrl+s blocking the current output of the screen, locking
CTRL + C terminate command
CTRL + Z Hang command
Alt+r Delete the current entire row
Ctrl+w to the top of the word from the cursor to the left
Alt+d right from cursor to end of word
Help
Whatis
Show a short description of the command
Working with databases
Cannot be used immediately after installation
makewhatis| MANDB Production Database
Examples of Use:
Whatiscal or Man–f cal
18
650) this.width=650; "Src=" Https://s3.51cto.com/oss/201711/20/3d5dd09d067a36a29f37720671a5fef8.png-wh_500x0-wm_3 -wmp_4-s_1089280182.png "style=" Float:none; "title=" 2017-11-20_132156.png "alt=" 3d5dd09d067a36a29f37720671a5fef8.png-wh_ "/>
Help
Show usage Summary and parameter list
Use of most but not all of the
Example:
Date--help
19650) this.width=650; "Src=" Https://s3.51cto.com/oss/201711/20/ea517fb9a0aba88f9ac9ca4c381b6c3e.png-wh_500x0-wm _3-wmp_4-s_3870790783.png "title=" 2017-11-20_132205.png "style=" Float:none; "alt=" Ea517fb9a0aba88f9ac9ca4c381b6c3e.png-wh_ "/>
Usage:date[option] ... [+FORMAT]OR:DATE[-U|--UTC|--UNIVERSAL][MMDDHHMM[[CC]YY][.SS]]
[] indicates an option
Caps or <> indicates changes in data
... Represents a list
X |y| Z means "x or Y or z"
-abc means-a-b–c.
{} means grouping
Mans
file that provides command help
Manual page stored in/usr/share/man
Almost every command has a man's "page"
The man page is grouped into different "chapters"
Collectively known as Linux manuals
Configuration file for man command:/etc/man.config| Man_db.conf
Manpath/path/to/somewhere: Indicates the man file search location
Man-m/path/to/somewhere command: Searches the command command's hand pages to the specified location and displays
Chinese man needs to install package MAN-PAGES-ZH-CN
1: User command
2: System call
3:C Library Call
4: Equipment files and special files
5: Configuration file format
6: Game
7: Miscellaneous
8: Commands for managing classes
9:linux Kernel API
View Man manual page
Man [Chapter] keyword
List all Help
Man–a keyword
Search Man Manual
Man-kkeyword List all matching pages
Using the Whatis database
Equivalent to Whatis
man–f keyword
Print the path to the man Help file
man–w [Chapter] Keyword
Get help with online documentation
Third-party Application official documentation
http://www.nginx.org
http://tomcat.apache.org
http://httpd.apache.org
http://www.python.org
Available through the official documentation CD or website of the release version
Installation guides, deployment guides, virtualization guides, and more
Red Hat Knowledge Base and official online documentation
Http://kbase.redhat.com
Http://www.redhat.com/docs
Http://access.redhat.com
Getting Started with Linux