Linux Shell terminal common shortcut keys Daquan

Source: Internet
Author: User
Tags clear screen

In daily work, a lot of things to deal with the computer often, especially high frequency use of some professional software, or play some keyboard streaming nature of the game, you should be familiar with the commonly used shortcut keys, so play not only efficient, but also slightly professional.

For some IT workers, the Linux shell terminal is a frequently used tool, if you can skillfully use shortcut keys, do things and do not do more with less.

Here are some of the shell terminal commonly used shortcut keys, they are generally the shift, Ctrl, alt keys and other key combinations, these shortcut keys are tested on ubuntu/gnome, can be used normally.

1. Set shortcut keys

Shortcut key settings can open the shell terminal "Edit" menu under "Keyboard shortcuts", there are some default shortcuts, of course, you can also customize shortcut keys, but the default shortcut has become an operating habit, more general, here the main introduction of the default shortcut keys.
Tip: Compared to Windows or Linux file systems, the shell Terminal shortcut keys are generally combined with the SHIFT key to use, such as copy, paste shortcut keys.

2. Open and close the terminal

Ctrl + Alt + t: Opens a new terminal terminal, which is also a new Windows window.
Shift +ctrl + t: Opens a new tab on an existing terminal, instead of window windows.
Shift +ctrl + N: Opens another new terminal on the existing terminal, i.e. a new window.
Ctrl + D: Closes a tab and if a terminal has multiple tabs, only the current tab is closed.
Shift +ctrl + W: The effect is similar to Ctrl + D but different, this shortcut does not work when there is only one tab on a terminal.
Shift +ctrl + Q: Close the current terminal, and if the terminal has more than one tab, all tabs will be closed.

3. Open the menu bar

The Shell Terminal menu bar has six tabs, namely file, Edit, View, Search, Terminal, Help, open their shortcut is a key combination, that is, the ALT key and menu English words of the first letter, for example:
Alt + F: Opens the File menu. The prerequisite for using this shortcut is that the shell terminal configuration has the ability to open the menu bar with the shortcut key enabled, which is also mentioned below.

4. Paste and copy

Shift + Ctrl + C: copy.
Shift + Ctrl + V: Paste.
Mouse wheel: If you use the mouse to select a continuous text, click the mouse wheel to complete the copy, paste function, paste position at the current active cursor.

5, change the terminal size, zoom text font

F11: Toggles between the full screen and the current screen size.
Shift + Ctrl + +: Text font size and terminal size are proportionally larger, and the last plus sign is the key with the equal sign above the keyboard letter area.
Ctrl +-: Text font size and terminal size are proportionally smaller, and the last minus is the key above the keyboard letter area.
Ctrl + 0: Text font size and terminal size are also restored to normal values.
Ctrl + L: Clear screen, small letter L, not number 1.

6. Find the specified text

Shift + Ctrl + F: Opens the Text Lookup dialog box, where you can configure some find rules and enter find objects to start the search.
Shift + Ctrl + H: look backwards. If you enter a Find object in the Text Lookup dialog box and find at least once, then close the dialog box. Backward lookups are backwards matched from the beginning of the terminal, and if any text is selected anywhere in the cursor, the backward match starts here.
Shift + Ctrl + G: look forward. If you enter a Find object in the Text Lookup dialog box and find at least once, then close the dialog box. The forward lookup is matched forward from the end of the terminal, and if any text is selected anywhere in the cursor, the forward match starts here.

7. View the Help document

F11: View the Help documentation.

8. Switch between multiple tabs on the shell terminal

Ctrl + Pg dn:tab downward switch, usually from left to right.
Ctrl + Pg Up:tab is switched up, usually from right to left.
SHIFT + Ctrl + Pg Dn: Moves the tab to the left.
SHIFT + Ctrl + Pg up: Moves the tab to the right.
Alt + Num:num is a specific number that represents the switch to num (counting from left to right) tab.
ALT + Tab: Use this key combination if you are switching between multiple terminals, not limited to the shell terminal.

9, program-related

Sometimes we have to compile or run some programs that perform the following quick actions:
Ctrl + S: Hangs, feels similar to pausing.
Ctrl + Q: Exit hangs, feel similar to continue, found pressing the keyboard other keys can also exit hang, a little doubt.
Ctrl + C: Interrupts and kills, program terminates.
Ctrl + Z: The interrupt program is placed in the background and wakes up using the "FG" command.

10. Move the cursor

Ctrl + B: With the left mouse button, move the cursor to the left.
Ctrl + F: Right-click with the keyboard and move the cursor to the right.
Alt + B: Move forward the distance of a word. If the shell terminal configuration is enabled and the menu can be opened by shortcut keys, the workaround is to disable this feature or use it with the SHIFT key.
Alt + F: Move backward the distance of a word. If the shell terminal configuration is enabled and the menu can be opened by shortcut keys, the workaround is to disable this feature or use it with the SHIFT key.
ESC + B: Moves to the beginning of the current word.
ESC + F: Moves to the end of the current word.
Ctrl + A: Moves the cursor to the beginning of the command.
Ctrl + E: Moves the cursor to the end of the command line.
Ctrl + x + x: The cursor toggles between the positions of the last two occurrences of the cursor in the command line.

11. Delete command

Ctrl + H: Same as BACKSPACE, backspace left delete.
Ctrl + D: Same as Delete, remove right.
Ctrl + W: A word before the cursor is clipped.
Alt + D: A word after the cursor is clipped.
Ctrl + u: Cuts all commands to the left from the current cursor position.
Ctrl + K: Cuts all commands to the right from the current cursor position.

12. Replace command

Alt + u: A string that starts with the current character, and the letter is replaced with uppercase.
Alt + L: A string that starts with the current character, and the letter is replaced with lowercase.
Alt + C: The current character becomes uppercase, and a backward string becomes lowercase.
Ctrl + T: The last two characters before the swap cursor.
Alt + t: Swaps the position of the current word and the previous word. If the shell terminal configuration is enabled and the menu can be opened by shortcut keys, the workaround is to disable this feature or use it with the SHIFT key.
ESC + t: Swaps the last two words before the cursor.

13. Historical order

Up down ARROW: To view the history command, just press the up and down arrows to display the command one at a time.
Ctrl + R: View history commands, you need to enter the starting letter of the command, the remainder of the auto-completion.
Ctrl + P: Displays the previous command, with an up arrow.
Ctrl + N: Displays the next command, with the down arrow.
History: View historical commands, all displayed in order, with corresponding numbers.
!num: Executes the num command in the history command list.
!! : Executes the previous command.
!? String: Executes the most recent command that contains string strings.
LS!$: Executes command ls, and the last string of the above command is its argument.

14. Other

Tab: Press once to complete and list all relevant information two times.
ESC +.: Inserts the last parameter, which is the last argument of the previous command, or a string.
Ctrl + V: Pastes the most recently clipped text.
Ctrl + V + special characters: Add a special character, such as tab.

Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

Linux Shell terminal common shortcut keys Daquan

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.