Common commands for Linux

Source: Internet
Author: User

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

  

Common commands for Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.