- The first is the command prompt [[email protected] ~]#
- Root: currently logged in user
- localhost: Host name
- ~ Current directory (home directory) The home directory of ordinary users is the home directory of/home/user;root users is/root
- #超级用户的提示符
- $ ordinary user's prompt
- Querying content in a directory: LS [options] [file or directory]
- -A: Displays all files, including hidden files;. The file that begins with the.
- -L: Show details,-"ls-l can be abbreviated to LL
- -D: View Directory properties
- -H: User-friendly display file size
- -I: Display inode
- Build directory: mkdir-p [directory name]
- -P recursive creation using when creating a multilevel directory
- MKDIR is: Make directories
- Switch directories: CD [catalogue]
- CD is: Change directory
- CD ~: Enter the current user's home directory
- Cd
- CD-Go to last directory
- Cd.. Go to the top level directory
- Cd. Go to current directory
- Relative path:
- Absolute path:
- Delete directory: RmDir
- RmDir namely: Remove empty directories
- Delete a file or directory: RM-RF [file or directory]
- RM is: Remove
- -R: Delete Directory
- -F Mandatory
- Copy command: CP [options] [source file or directory] [target directory]
- CP is: Copy
- -r: Copy directory
- -P: File attribute copying
- -D: If the source file is a linked file, copy the link property
- -A: equivalent to-PDR
- Cut or Overwrite commands: MV [source files or directories] [target directory]
- MV is: move
- Note that the-r option is not
Common commands for Linux