I. BASIC commands
1. Type Command----View the types of commands
A. built-in commands (internal command) shell built-in
B. external Command ----An executable file with a command name in a path on the file system
Usage:type command name
Judging by the value returned, if the value is a shell builtin then it is a built-in command, if it is not the value but a path then it is an external command
2.printenv Command---View environment variables
echo $PATH ----The value of the output environment variable, using a colon-delimited path
3.Set command--View all system variables
4.echo command-The value of the output variable
Usage:echo $ variable name
Assign a value to a variable without the $ character direct variable name = "Variable Value"
Question: How to output two variables in one command and let them show in two lines
echo-e "$HOSTNAME \ n $USER"
To use the escape character \ n requires the-e option
Issue: Echo command defaults to output after wrapping how to output without wrap
echo-n $name
5.Clear Command---clear screen (same as crtl+l function)
6.date or Clock command---View the current system time
Usage: Date +%d Formatted output requires a character + in front of the format character +
Date + "This is%Y"
Issue: Output line break
Date + "This year was Y%n today is%d"
7.hwclock Command---View hardware time
Hwclock-s synchronizing the hardware clock to the system clock
Hwclock-w synchronizing the system clock to the hardware clock
8. Man Command---Get external command Help (manual user manual)
You can also use: command name--help to get External command brief usage information
Usage: Man 2 command
2 represents the number of chapters to view
Manual commands are displayed in sub-chapters
A. Chapter I user commands (available to/bin,/usr/bin,/usr/local/bin administrators and ordinary users)
B. Chapter II system invocation
C. Third-chapter library invocation
D. Chapter IV Special documents (character device files, block device files)
E. Chapter V file format (the syntax of the configuration file, which represents the interpretation of the meaning of each field in the file)
F. sixth chapter game
G. seventh Chapter Miscellaneous
H. eighth chapter Management commands (/sbin,/usr/sbin,/usr/local/sbin only available to administrators)
<>: Required
[]: Optional
... : multiple times can occur
|: Choose one More
{}: Grouping
Mans:
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
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
Q: Exit
9. help command---Get assistance with internal commands
whatis Command---View the command is in the section of the Manual manual.
Usage: Whatis command
11. Documentation:/usr/share/doc
Thecal command---Display the calendar table
The argument can be a certain year of the month
13. Question:
A.echo is an internal or external command
Type echo---internal command
The role of the B.man command
Man echo function to show help for the echo command
C. How to use echo to wrap a line display
Echo-e "$HOSTNAME \n$path"
This article is from "Luo Chen's blog" blog, please be sure to keep this source http://luochen2015.blog.51cto.com/9772274/1632953
Introduction to basic commands under Linux (i)