First, Introduction
1.
Cal Calendar
LS Viewing files and directories
WHOAMI Viewing Current user information
Users or who or W view the current online user
Logout Sign Out
Shutdown or Powoff shut down the system
Init 6 or Reroot reboot system
passwd Change Password
Ii. Document Management
1. File System: Tree structure (Directory/file)
2. File type: Normal, directory and device file (character C and block B)
3, ls ch*.doc display chxxx.doc file or directory, where xxx is 0 or more arbitrary characters;. is a character.
4. Hidden files: "." begins with a file, such as. PROFILE,.KSHRC,.CSHRC, (init script). rhosts (config file)
View hidden files: ls-a
5. Create File: VI filename
[I] Input
Exit with ESC or SHIFT+ZZ
6. Cat FileName View File contents
Cat-b FileName Display line number
7. WC statistics Number of rows, words, characters
8. CP file1 file2 Copy files 1 to 2
9, MV file1 file2 change path and file name
10. RM FileName Delete File
11. Linux runtime creates three file streams: 0,1,2 (Input/output/error message)
Third, Directory
1, CD ~ Enter the main directory
CD ~usersname into other user home directories
CD-Back to previous directory
2. Absolute path: Have/
Relative path: none/
PWD Gets the current directory
3, mkdir dirname Create directory
Mkdir/tmp/dir-name creating Dir-name in the/tmp directory
mkdir dirname1 dirname2 can create multiple directories at the same time
Mkdir-p/tmp/test/dir-name Create the desired directory in one layer
4, rmdir dirname Delete directory (need directory is empty)
5, cd dirname switch directory
6, MV dirname1 dirname2 Rename directory, 2 Generation 1
7, ".": Current directory;
【.. ": Parent directory.
Iv. file permissions and Access modes
1, chmod Modify Permissions rwx--421
chmod 755 Testfile
2, chown Modify the file owner
Chgrp Modifying a group
3, suid and Sgid: lowercase s has x permission, capital S does not have X permission;
V. Environment variables
1, echo $TEST display variables, need to use $
2, Shell initialization process: check/etc/profile and. Profile, there is read, otherwise skipped;
3, can be modified by VI. Profile, while/etc/profile generally does not have permissions.
4, set the terminal type: VT100, ANSI, xterm
term=vt100 Virtual Terminal
5, Path=/bin:/usr/bin multiple paths with ":" Separated