[NOI Linux] All commands and meanings of Linux terminal

The Linux terminal is a command line interface through which users can interact with the operating system and perform various operations. Here are some commonly used Linux terminal commands and their meanings:

  1. ls: List files and folders in the current directory
  2. cd: Change the current working directory
  3. mkdir: Create a new folder
  4. rm: delete a file or folder
  5. cp: Copy a file or folder
  6. mv: move or rename a file or folder
  7. cat: View the contents of a file
  8. more: View the contents of the file, displayed page by page
  9. less: View the contents of the file and turn pages using the up and down keys.
  10. vi: edit files
  11. grep: Search for a specified string in a file
  12. find: Find the specified file or folder
  13. uptime: displays the time the system has been running
  14. top: Displays the process status of the current system
  15. df: Displays the disk usage of the current system
  16. kill: kill a process
  17. ls -al: List all files and folders in the current directory, including hidden files
  18. ls -at: Sort files by creation time
  19. ls -alh: Sort by file size
  20. ls -ah: Sort by file name indentation
  21. cd ~: Switch to the user's home directory
  22. mkdir new_dir: Create a new folder
  23. rm -rf file: force file deletion
  24. cp -r file new_dir: Copy the file to the folder
  25. mv new_dir/ file: Move files into folders
  26. cat /dev/null: View empty file contents
  27. more /dev/null: View the contents of empty files, displayed page by page
  28. less /dev/null: View the contents of empty files, and you can turn pages by pressing the up and down keys.
  29. vi+: Insert content at the beginning of the current line in the file
  30. vi -: Insert content at the end of the current line in the file
  31. vi e: Edit content at the beginning of the current line in the file
  32. vi o: Edit content at the end of the current line in the file
  33. vi s: edit content in the middle of the current line in the file
  34. find . -name "file": Find the file named "file" in the current directory
  35. find . -type f -name "file": Find files named "file" in the current directory, only display files
  36. find . -type d -name "file": Find the folder named "file" in the current directory, only display the folder
  37. ls -a: List all files and folders in the current directory, including hidden files
  38. ls -at: Sort files by creation time
  39. ls -alh: Sort by file size
  40. ls -ah: Sort by file name indentation
  41. cd ..: Return to the previous directory
  42. cd /: Return to the root directory
  43. mkdir -p /path/to/new/folder: Create a multi-level folder

This article is for reference only. Please forgive me if there are any deficiencies.

Guess you like

Origin blog.csdn.net/FlyFree56/article/details/132078730