1, Whereis
Whereis [Options] FILE
The path to the relevant files, such as binaries, source code files, and man manual pages, used to locate instructions.
The Whereis command can only be used for program name searches, and only binary files (parameter-B), man description file (parameter-m), and source code file (parameter-s) are searched. If the argument is omitted, all information is returned.
2. Enable
Enable-n internal commands to disable internal commands
Enable internal commands
3, Hash
View a list of external commands that have been executed
hash-d command clears the specified commands
Hash-r Clear All
4. TTY
View Login Terminal
5, W
View the user's logon information, and view the actions that the user is performing
6, CentOS 7 shutdown:
Halt power off continuously
Poweroff shutdown and power off, equivalent to unplug power
Shutdown-h now
Init 0
7. Reset
Fixed screen display garbled or something.
8. ① command Line Extension: $ () or '
To print the output of one command to the parameters of another command
[[email protected] ~]# echo "The system name is $ (hostname)"
The system name is CENTOS7
[Email protected] ~]# echo "I am ' WhoAmI '"
I am Root
Sometimes $ () equals '
② bracket extension: {}
Print a simplified form of a repeating string
[email protected] testdir]# touch File{1,2,3,4,5}_{txt,log,doc ...}
[Email protected] testdir]# rm-f File{1,2,3,4,5}_{txt,log,doc ...}
9, Whatis:
View a brief description of the command and the chapter number of the man in which it resides
~]# whatis command or ~]# man-f command
Use Man-f, Whatis, apropos appear nothing appropriate error message.
How to resolve:
centos6.x System:
Use root to perform Makewhatis update Whatis database
centos7.x System:
Use root to perform MANDB update Whatis database
Note: The system execution for the minimized installation is not valid.
10. Command Help:
Difference inside and outside command: # type command
Use Help:
Internal command:
#help COMMAND
#man Bash
External command:
(1) # COMMAND--help
# command-h
[Email protected] ~]# date--help
Usage:date[option] ... [+FORMAT]OR:DATE[-U|--UTC|--UNIVERSAL][MMDDHHMM[[CC]YY][.SS]]
[] is optional
Caps or <> are variables
... Represents a list
X |y| Z means "x or Y or z"
-ABC means-a-b-c
(2) User manual (manual)
# Man COMMAND
(3) Information page
# info COMMAND
(4) Help documentation for the program itself
Readme
INSTALL
ChangeLog
(5) Official program document
Official site: Documentation
(6) Official documents of the release version
(7) Google
Man Chapter Number:
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
/keyword:
Searches the end of the file from the current position with the string specified by keyword as the keyword;
N: Next
N: Previous
11. Date
[[email protected] ~]# date-d " -10day" +%f date before 10 days
2016-07-16
12. Calculator BC
13. Run the original command:
/bin/ls or ' ls ' or \ls
14, command execution priority:
Alias > Internal > Hash> External
15. Empty the command history:
Delete the history file first. bash_history; Execute History-c;exit exit
~]# history-n Scene: Terminal session A is open, copy a session window to B, then execute some commands on a, history-a write to the history file, when B reads the previous record,
The record of the history file can be read by executing history-n. (Read the new record in A's history file again)
~]# history-r Scene: Terminal session A is open, copy a session window to B, then execute some commands on a, history-a write to the history file, when B reads the previous record,
The record of the history file can be read by executing history-n. (Will read all the records in A's history file again)
~]# History-s forged an order, and did not really perform
Permanent: stored in/etc/profile (global) or ~/.bash_profile (personal)
16. File directory Structure
[[email protected] etc]# tree-l 1/ View level directory
17. Check User Login Status
18. Info
Man is often used for command reference, GNU tool info is suitable for general document reference.
No parameters, list all pages
The info page is structured like a Web site
Each page is divided into "nodes"
Before link node *
info [command]
19. Screen
Function 1: Ask for help, connect the same host, screen sharing, exit exits, can be joined by multiple terminals, all execute screen-x help can, Screen-ls view background running program
Terminal A: ~] #screen-S help Terminal B: ~]# screen-x Help
Function 2: Perform screen--------->yes--------------->ctrl+a,d after stripping------------->screen-r recovery, CTRL + C termination
20, change users do not login: (graphical interface only)
Vim/etc/gdm/custom.conf
Insert between [daemon] and [security]:
Automaticloginenable=true
Automaticlogin=root
Test Site only With