UNIX was written by Ken Thompson in 1969 and is a prototype of later versions of the kernel. Later in August 1991, Linus Torvalds created an open source Linux and made an epoch-making contribution to open source development. In the Linux system, out of the Windows graphical interface, all operations are handed to the shell program on top of the kernel, which is an interactive interface for our management hardware. This Learning goal: Learn about basic Linux usage.
First, login to Linux
After entering the Linux system, the user will be prompted to log into the system, enter the user name password after landing.
Note: Root Login display #
Normal User Login Display $
Second, switch the login interface
<1> graphical interface with command line interface:
ctrl+alt+f# (2--6)
CHVT # (2--6)
Init 3
<2> command Line Interface-----> Graphical interface:
Ctrl+alt+f1
CHVT 1
Init 5
Note: It is not recommended to perform operations in the production life, as the understanding can
Third, shutdown, restart command
Rebort: Restart
Init 0: Shutting down the machine
Poweroff: Shut down the machine
Halt: Shut down the machine
Shutdown
-H time massage:time shutdown and output massage
Example: Shutdown-h +1 System would down after 3 miinutes
650) this.width=650; "title=" 2016-07-23_110405.png "src=" http://s1.51cto.com/wyfs02/M02/84/88/ Wkiol1etmuzczbt7aaau6s8oscq785.png-wh_500x0-wm_3-wmp_4-s_3625539252.png "alt=" Wkiol1etmuzczbt7aaau6s8oscq785.png-wh_50 "/>
-R time massage:time restart, and output massage
Note: Ctrl + C can terminate the execution of the above command.
Five, User command format
Command format
Command [OPTIONS ...] [ARGUMENTS ...]
OPTIONS: Adjusting Commands
Short options:-C, for example:-l,-h ...
Long options:--word, for example:--all,--humen-readable ...
ARGUMENTS: processing objects for commands
VI. basic Commands
Ifconfig: Display network card information
TTY: Show terminal number
History: Viewing command Histories
Nano: Text Editor
Gedit: Graphical Interface Editor
Cat file: Viewing file information
Date: Display system software time
+%f: Displays the current time in yy-mm-dd form
+%y: Output year
+%m: Output Month
+%d: Output Date
+%h-%m-%s: Output The current time in hh-mm-ss form
+%j: Output Today is the first day of the year
-D "string": the time expressed by the output string
-D + 10: Date after 10 days of output
Clock: Display System hardware Time
HWCLOCK-W: Synchronizing hardware time for software time
Hwclock-s: Synchronization software time is hardware time
BC: Bring up Calculator
Cal [DD] [MM] [YY]: Output calendar
Alias: View command aliases
Alias Command=value: Defining command aliases
650) this.width=650; "title=" 2016-07-23_170631.png "src=" http://s3.51cto.com/wyfs02/M00/84/88/ Wkiol1etm9wjpzr4aaay6rz2myq096.png-wh_500x0-wm_3-wmp_4-s_627092602.png "alt=" Wkiol1etm9wjpzr4aaay6rz2myq096.png-wh_50 "/>
Unalias command: To cancel an alias
Echo
-N [string]: no newline output string
-e [string]: treated as a special symbol if the following symbol appears in STRING
\ n: Line break output
\ t: Insert tab
\a: Make a sound
\ \: Insert \ Character
\0NNN: inserting ASCII characters represented by NNN (octal)
\033[##;**m\033[0m: Inserting a color-colored font
##:41-47, background color, followed by red, green, blue, violet,
* *: 31-37, front view, ibid.
Hash: View Cache
-D COMMAND: Deletes the specified cache
-R: Delete all Caches
Screen: Create an onscreen management
-ls: View the current screen session list
Exit: Exit screen and delete the
Ctrl+a,d: Exit Session information
-R: Resuming session
-S Session_name: Create a session with the specified name
-X Session_name: Connect into session
650) this.width=650; "title=" 1.png "src=" http://s4.51cto.com/wyfs02/M00/84/88/ Wkiom1etomacq-veaaasbv2z4ou214.png-wh_500x0-wm_3-wmp_4-s_3861631527.png "alt=" Wkiom1etomacq-veaaasbv2z4ou214.png-wh_50 "/>
Note: This feature is very convenient for use in screen sharing, it is recommended to master
VII. Handbook of Help
Get method:
Whatis command: Get the directory where the commands help information
Whereis command: Get the path to the commands and the directory where the Help information resides
For internal commands
Help COMMAND
For external commands
COMMAND--help
Mans COMMAND
Note: info is similar to man and a command to view Help manuals
Eight, small commands--big security
Linux, you may wish to change several configuration files to ensure the security of our system.
Vim/etc/centos-release
650) this.width=650; "title=" 5.jpg "src=" http://s1.51cto.com/wyfs02/M00/84/88/ Wkiol1etq47i9rpeaacq2d2hij4138.jpg-wh_500x0-wm_3-wmp_4-s_3840120693.jpg "alt=" Wkiol1etq47i9rpeaacq2d2hij4138.jpg-wh_50 "/>
What the heck? CentOS 10.1, have you seen it?
Vim/etc/issue
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M01/84/88/wKioL1eTRxOTNteqAAAx_xMoOxk494.jpg-wh_500x0-wm_3 -wmp_4-s_394090859.jpg "title=" 9.jpg "alt=" Wkiol1etrxotnteqaaax_xmooxk494.jpg-wh_50 "/>
As a hacker small white you, is not already blindfolded, haha!
Also note that: real life, not directly using the root user login!
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M00/84/8B/wKiom1eUGO-QrHDlAAAGw1OF6rQ789.png-wh_500x0-wm_3 -wmp_4-s_3826050454.png "title=" 1.png "alt=" Wkiom1eugo-qrhdlaaagw1of6rq789.png-wh_50 "/>
The above are summed up in their own, what is not the right place, but also hope that you are more correct!
This article is from the "dmwing" blog, make sure to keep this source http://dmwing.blog.51cto.com/11607397/1829404
Basic Linux Learning