Linux command line edit shortcut keys

Source: Internet
Author: User
Tags clear screen terminates

Linux Command line edit shortcut keys
  1. History displays a list of command histories
  2. ↑ (ctrl+p) Show previous command
  3. ↓ (CTRL + N) Displays the next command
  4. !num the NUM command that executes the command history list
  5. !! Executes the previous command
  6. !? String? Executes the most recent command with string strings
  7. Ctrl+r then enter several characters, start searching up for the command that contains the character, and continue to press Ctrl+r to search for the previous matching command
  8. Ctrl+s is similar to ctrl+r, just forward retrieval
  9. alt+< History list First item
  10. alt+> History list Last item
  11. CTRL+F cursor moves forward one character, equivalent to
  12. CTRL+B cursor moves backward one character, quite with <-
  13. ALT+F cursor moves forward one word
  14. ALT+B cursor moves backward one word
  15. LS!$ executes command ls, and the parameter of one of the above commands is its parameter
  16. CTRL + A moves to the beginning of the current line
  17. Ctrl+e move to the end of the current line
  18. Esc+b move to the beginning of the current word
  19. Esc+f move to the end of the current word
  20. Ctrl+l Clear Screen
  21. Ctrl+u all characters before the cursor in the command line is clipped (excluding itself)
  22. Ctrl+k all characters (including itself) after the cursor in the command line is clipped
  23. Ctrl+d Delete the character at the cursor location
  24. Ctrl+h Delete the previous character where the cursor is located
  25. Ctrl+y Paste the character you just deleted
  26. Ctrl+w A word that precedes the clipping cursor (with spaces, punctuation, and so on as separators)
  27. Alt+d the words after the clipping cursor
  28. Esc+w Delete the character that precedes the cursor to the end of its word (separated by spaces, punctuation, and so on)
  29. Ctrl+t reverses the position of the character where the cursor is located, and moves the cursor to the next character
  30. Alt+t Exchange Current and previous word position
  31. Alt+u convert the current word to uppercase
  32. Alt+l convert the current word to lowercase
  33. Alt+c to capitalize the current vocabulary into the first character
  34. CTRL + V inserts special characters, such as Ctrl+v+tab join the TAB key
  35. Esc+t reverses the position of the cursor and its adjacent words
  36. CTRL + C Delete entire row
  37. CTRL + (x u) hold CTRL while you press X and u again to undo the action you just made
  38. Ctrl+s suspending the current shell
  39. Ctrl+q to re-enable the suspended shell
  40. [Ctrl] + [Alt] + [Backspace] = kills your current X session. Kill the graphical desktop session and return you to the login screen. If the normal exit step does not work, you can use this method.
  41. [Ctrl] + [Alt] + [Delete] = Shut down and re-boot Red Hat Linux. Close your current session and reboot the OS. Use this method only if the normal shutdown step does not work.
  42. [Ctrl] + [Alt] + [Fn] = Toggle screen. [Ctrl] + [ALT] + one of the function keys will display a new screen. According to the default settings, from [F1] to [F6] is the shell prompt screen, [F7] is a graphical screen.
  43. [Alt] + [Tab] = switch tasks in a graphical desktop environment. If you have more than one application open at the same time, you can use [Alt] + [TAB] to switch between open tasks and applications.
  44. [Ctrl] + [A] = move the cursor to the beginning of the line. It can be used in most text editors and in the URL fields of Mozilla.
  45. [Ctrl] + [d] = Log off (and close) from the shell prompt. With this shortcut, you don't have to type exit or logout.
  46. [Ctrl] + [E] = move the cursor to the end of the line. It can be used in most text editors and Mozilla's URL fields.
  47. [Ctrl] + [l] = clear the terminal. This shortcut works the same as typing clear at the command line.
  48. [Ctrl] + = Clears the current line. If you are working under a terminal, use this shortcut to clear the characters from the cursor to the beginning of the line.
  49. [middle mouse button] = paste the highlighted text. Use the left mouse button to highlight the text. Point the cursor to the place where you want to paste the text. Click the middle mouse button to paste it. In a two-button mouse system, if you configure the mouse to simulate the third button, you can click the left and right mouse buttons to perform the paste.
  50. [Tab] = command line auto-complete. You can use this command when using shell hints. Type the first few characters of a command or file name, and then press the [Tab] key, which automatically complements the command or displays all commands that match the characters you type.
  51. [Up] and [down] arrow = show command history. When you use the shell hint, press the [up] or [down] arrows to view the history of the command you typed in the current directory. When you see the command you want to use, press the [Enter] key.
  52. Clear = Clears the shell prompt screen. Typing it at the command line clears all the data displayed in this shell prompt screen.
  53. Exit = Logoff. Type it in the shell prompt to log off the current user or root user account.
  54. History = Show Command Histories. Type it in the shell prompt to display the top 1000 numbered commands that you typed. To display a shorter command history, type a number in the empty space after you have entered the historical F. For example: History 20.
  55. reset = Refresh the shell prompt screen. If the character is not clear or garbled, typing this command at the shell prompt refreshes the screen.
  56. # Ctrl-u: Erases the previous section of a row of cursors.
  57. # ctrl-h: Erases one character before the cursor.
  58. # ctrl-d: Terminates the input. (Exit the shell if you are using the shell).
  59. # ctrl-c: Terminates the program that is currently running.
  60. # ctrl-z: Pause the program.
  61. & ")
  62. # ctrl-s: Stop output to the screen.
  63. # Ctrl-q: Re-activates the output to the screen.
  64. The default shell, ' Bash ', has historical editing and tab completion.
  65. # Up-arrow: Start history Command search.
  66. # Ctrl-r: Start incremental History Command Search, you can follow the keywords to find out which commands you have used.
  67. # TAB: Complete the input file name to the command line.
  68. # ctrl-v Tab: Enter tab instead of extension command line.
  69. # Ctrl + P-Previous command
  70. # Ctrl + N-Next command
  71. # Ctrl-u: Erases the previous section of a row of cursors.
  72. # Ctrl + Y-paste the previous Ctrl+u class command to delete the characters, is the paste is not undone Ah!

  Advanced Applications  

    1. # !! -Previous command
    2. #!-n-Countdown nth History command
    3. #!-n:p-Print previous command (not executed)
    4. # !? String -Latest command with "string"
    5. #!-n:gs/str1/str2/-Replaces the str1 of the last nth command with STR2 and executes (replaces the first only if no G is added)

  Some other useful Linux command-line key combinations

    1. # Ctrl-alt-del: Suspend or restart the system, these three Linux command line keys under Linux can be easily modified to shutdown operation, which is very convenient for single-user friends
    2. # Ctrl + L-Clear screen
    3. # Ctrl + A-cursor moves to the beginning of the line
    4. # Ctrl + E-the cursor moves to the end of the line
    5. # Ctrl + W-clear the cursor before a word
    6. # Ctrl + K-Clears the character of the cursor to the end of the line
    7. # Ctrl + T-swap the first two characters of the cursor
    8. # CTRL + V-input control word such as CTRL + V. will enter ^M
    9. # Ctrl + F-Move the cursor back one character
    10. # Ctrl + B-cursor moves forward one character
    11. # Ctrl + H-delete a character before the cursor
    12. # N++F-Move the cursor back n words, n is 1 can be omitted
    13. # N++B-the cursor moves forward n words, n is 1 can be omitted
    14. # Left-click-and-drag Mouse: Select and copy to Clipboard.
    15. # Click middle mouse button: Paste using the contents of the Clipboard.
    16. # Meta-key (Emacs terminology) is traditionally used in Left-alt-key

Linux command line edit shortcut keys

Related Article

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.