CLI (command line Interface) in the format:
Command option Parameters
Command Options ... arguments
Options: Short options:-character multiple options can be combined, such as-a-b=-ab
Long option:--word
Parameters: The Action object of the command
Control type:
Via Virtual terminal: CTRL+ALT+F1-F6
Through the terminal emulator: Click on the Open terminal in the GUI
Remote access via telnet or SSH
GUI (graphical User Interface) and CLI (Command line Interface)
Gui:x-window under the GNOME,KDE,XFCE, etc.
CLI:SH,BASH,CSH,KSH,TCSH,ZSH, etc.
Common commands:
1.su:switch User
Format: su [-l] Username
-L: Switch between user and shell environment
2.ls:list
Format: LS [-HAADIRR] Directory
-L: Display as long format
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M02/6F/C2/wKiom1WnV3GyFfC4AACESCwD-RE430.jpg "title=" ls-l command "alt=" Wkiom1wnv3gyffc4aacescwd-re430.jpg "/>
File type: the
-: Normal file (f)
D: Catalog file (diretory)
B: Block device files (blocks)
C: Character device file (character)
L: Symbolic Link files (symbolic link file)
P: Command pipe file (pipe)
S: Socket file (socket)
File permissions: 9-bit, every 3-bit group, each group: rwx (Read, write, execute), r--
Number of hard links to files
Owner of the file
Genus Group of files
File size (size): units are bytes
Timestamp (timestamp): Modify time is displayed
Accessing access: Tools such as Cat view
Modify Modify: Content modification
Change changes: Change file properties
-H: Do unit conversions, display the file size bar in kilobytes
-A: Show multiple hidden files with. The current directory is represented: Represents the parent directory
-A: Displays hidden files that begin with. But not displayed. and.
-D: Display the directory's own properties
-I: Multiple display of the Index node column
-R: Reverse Display
-R: Recursive display
3.cd:change Directory
Format: CD: Home directory
~username: Enter the home directory of the specified user
-: Switch back and forth between the current directory and the previous directory
4.hash: History command executes the cache of the path and logs the number of times, and next time do not check the path variable
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/C0/wKioL1WnXw-BZi00AABvT87xYXs732.jpg "title=" hash Command "alt=" Wkiol1wnxw-bzi00aabvt87xyxs732.jpg "/>
Environment variables:
Permanent: variable is permanently in effect and needs to be modified/etc/profile configuration file
Temporary: Variables expire when the shell is closed and declared with the Export command
Path: a bunch of paths separated by colons, the first time a command executes to find a path in path that holds the execution file of the command
PATH declaration format: path= $PATH: <path1>:<path2>, .....
5.type: Shows which type the specified command belongs to
Format: Type command
Command type:
Built-in commands (shell built-in)
External command: There is an executable file corresponding to the command name in a path on the file system
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M00/6F/C0/wKioL1WnYnzTI0wYAABeF9T4EKA166.jpg "title=" type command "alt=" Wkiol1wnynzti0wyaabef9t4eka166.jpg "/>
6.date: Manage system time, view and modify system time
Format: Date: Displays the current system time
Date-s mm/dd/yyyy: Revised month day
Date-s hh:mm:ss: Seconds and minutes when modified
Format:%y represents the year
%m represents the Month
%d = Day
When%h represents
%M represents the Division
%s = seconds
%s represents the number of seconds from 1970/01/01 00:00:00 UTC to Now
650) this.width=650; "src=" http://s3.51cto.com/wyfs02/M01/6F/C0/wKioL1WnaRuRtH0cAAA5ellKrU0118.jpg "title=" date command "alt=" Wkiol1wnarurth0caaa5ellkru0118.jpg "/>
7.hwclock: Manage Hardware time
Format: hwclock-w: Write system time to hardware time
-S: Save hardware time to System time
8.cal:calendar
Format: Cal: Displays the current month's calendar
Cal-3: Show calendar for this month and two months before and after
CAL-Y: Show this year's calendar
9. Get the use of commands to help:
Internal command:
Help command
External command:
Command--help
Command manual: Manual
Man command (typically used for external commands, used to display the user manual of the shell corresponding to the built-in command)
Man Chapter Command
Chapter:
1: User command (/bin,/usr/bin,/usr/local/bin)
2: System call
3: library file
4: Special files (device files)
5: File Format (configuration file syntax): For example, ETC/PASSWD file format
6: Game
7. Miscellaneous (Miscellaneous)
8: admin command (/sbin,/usr/sbin,/usr/local/sbin) administrator has permission to use commands
Special characters that appear in man:
<>: Required
[]: Optional
...: can occur multiple times
|: Choose one More
{}: Description of the sections in the group man:
Name: command names and features brief description
Synopsis: Usage notes, including available options
DESCRIPTION: A detailed description of the command function, which may include the meaning of each option
Options: Explaining the meaning of each option
Files: The configuration file associated with this command
BUGS:
EXAMPLES: Using the example
See ALSO: Another reference
Actions in Man:
Flip Screen:
Turn back one screen: SPACE
Turn One screen forward: b
Turn back one line: ENTER
Turn One line forward: K
Find:
/keyword: Backwards
N: Next
N: Previous
? KEYWORD: Forward
N: Next
N: Previous
Exit: Q
This article is from the "Chenqiyi" blog, make sure to keep this source http://chenqiyi.blog.51cto.com/8125763/1675342
Linux Learning Notes < a >--common command