Today I will introduce to you the commonly used shortcut keys for command operations in the terminal under Linux. As a developer under Linux, dealing with the Linux system is a daily necessity, and you interact with Linux through the command line under the Linux terminal. Being proficient in the command line operations under the Linux terminal can make our work more effective with half the effort. Being familiar with the commonly used terminal command shortcut keys can greatly improve our work efficiency. The following are commonly used terminal shortcut keys. I hope you can master them and use them flexibly. Remember to collect and share! ! !
1. Terminal and tab shortcut keys
shortcut key |
Function |
Shift Ctrl T |
New tab page |
Shift Ctrl W |
Close tab |
Ctrl PageUp |
Previous tab |
Ctrl PageDown |
Last tab |
Shift Ctrl PageUp |
Move tab page left |
Shift Ctrl PageDown |
Move tab right |
Alt 1 |
Switch to tab 1 |
Alt 2 |
Switch to tab 2 |
Alt 3 |
Switch to tab 3 |
Shift Ctrl N |
New window |
Shift Ctrl Q |
Close terminal |
F11 |
full screen |
Ctrl Shift plus sign |
enlarge |
Ctrl minus sign |
Zoom |
2. Shortcut keys such as cut/copy/paste/delete
shortcut key |
Function |
Shift Ctrl C |
copy |
Shift Ctrl V |
Paste |
Ctrl Insert |
Copy command line content |
Shift Insert |
Paste the command line content |
Ctrl k |
Cut (delete) the characters from the cursor to the end of the line |
Ctrl u |
Cut (delete) the characters from the cursor to the beginning of the line |
Ctrl w |
Cut (delete) the word before the cursor |
Ctrl y |
Paste text deleted by Ctrl u, Ctrl k, Ctrl w |
Ctrl c |
Interrupt the task being executed by the terminal or start a new command input line |
Ctrl h |
Delete the previous character where the cursor is (equivalent to the backspace key) |
Ctrl l |
Clear all contents of the screen, same as clear command |
Ctrl s |
Lock the terminal so that it cannot input content |
Ctrl q |
Unlock the locked state of Ctrl s |
Ctrl z |
Pause execution of tasks running in the terminal |
3. Shortcut keys for moving the cursor
shortcut key |
Function |
Ctrl a |
Move to the beginning of the line |
Ctrl e |
Move to end of line |
Ctrl b |
Move one character back (left) |
Ctrl f |
Move one character back (right) |
Alt b |
Move one word back (left) |
Alt f |
Move one word back (right) |
Ctrl xx |
Move between the end of the command line and the cursor |
4. Historical command shortcut keys
shortcut key |
Function |
Ctrl p |
Display the previous historical command of the current command |
Ctrl n |
Display the next historical command of the current command |
Ctrl r |
Search for historical commands, and a matching command in the historical commands will be displayed as the input is entered. The Enter key executes the matching command; the ESC key is displayed on the command line but does not execute the matching command |
Ctrl g |
Exit from history search mode (Ctrl r) |
!! |
Previous command |
!pre |
Execute the latest command starting with pre |
!n |
Execution History |
Alt
|
The first item in history |
Alt > |
The last item in history is the currently entered command |
5. Control command
shortcut key |
Function |
Ctrl o |
Execute the current command and select the previous command |
Ctrl s |
Block screen output |
Ctrl q |
Allow screen output |
summary
Okay, let’s stop here first. This article only lists some commonly used shortcut keys, not all. Because there are many shortcut keys for terminal operations under Linux, we don’t need to remember them all. We only need to be familiar with the commonly used shortcut keys to make our operations fly! Let our work achieve twice the result with half the effort! Friends in need, remember to collect, share, and learn slowly!
The above is the detailed content of Linux terminal operation efficient shortcut keys. For more information, please follow other related articles on the PHP Chinese website!