Basic Linux commands

Source: Internet
Author: User
  1. Log out of the system
  2. Shut down the system and use the shutdown command to ensure that the user information and system information are complete. Only root users can use this command
  3. Shutdown [options] when [message], options:-r indicates restarting,-h indicates shutting down immediately after the system service is stopped (halt), and-f indicates restarting quickly; when specifies the shutdown time
  4. Ls displays all files and directories in the current directory
  5. Ls-a shows hidden files. The hidden files start "."
  6. Display files in other directories, and add the path of the directory to be displayed after ls, such as ls/
  7. Create a directory using mkdir
  8. Rmdir delete a directory
  9. Cd command to switch Directories
  10. Absolute path indicates the directory tree structure of the target file or subdirectory, and relative path indicates the location relative to the current working directory .".." Indicates the previous directory of the current working directory ."." Indicates the current working directory.
  11. Copy files, use the cp command, and use-r to copy Directories
  12. The mv command moves a file to another directory.
  13. Creating a file is to create a common file and the file is empty. You can use the touch command to create a general file.
  14. Rm command to delete files
  15. Wildcard character: * represents any character or string ;? Represents any character; [abc…] Represents any character in []
  16. Pwd displays the current directory
  17. Cat displays the file content on the screen
  18. Show the content of a large file-more
  19. Show file content-less, you can flip the page
  20. Show file content-head and tail: head are the first few lines of the file, and tail is the last few lines of the file. By default, they are all 10 lines.
  21. Use root to log on to the system and enter the home directory of the user by default. You can use pwd to print the location of the current working directory, and enter ls/Under the root directory to view
  22. The Directory of a common user is stored in the home directory. whoami can view the currently logged-on user.
  23. The Dev directory contains system devices. linux regards all the peripherals required by the system as files.
  24. Df: view the size of all partitions in the current system
  25. Df can only view the usage of each partition, but cannot view the usage of each directory. If you want to view the size of each directory, use all folders in the root directory of du.
  26. Netconfig
  27. Locale view language environment
  28. Cd ~ Returns the user's home directory, cd, the current user's directory, and cd.
  29. The vi editor has three modes: Command mode, input mode, and last line mode.
  30. Find [path] [expression] The most common use of this command is to search by file name, the file name expression format is:-name file name. The file name can be * or? Wildcard characters.
  31. The basic function of which is to find executable files in the PATH through the Environment Variable PATH.
  32. Whereis allows you to quickly find the file and provides the location for storing the binary executable file, source code file, and user manual page of the file.
  33. The mount command is used to mount a file system on a physical device to a directory in a linux File System, when the mount command does not use any options or parameters, information about the file systems that can be mounted in the current linux system is displayed,

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.