Shell shortcut keys

Source: Internet
Author: User
Tags clear screen terminates

Linux Command-line edit shortcut: History displays a list of command histories ↑ (Ctrl+p) Displays the previous command ↓ (Ctrl+N) Displays the next command!num executes the command history list of the num-bar command!! Execute the last command!? String? Executes the most recent command containing string string Ctrl+r then enter a number of characters, start searching up for the command that contains the character, and continue pressing CTRL +R, search for the previous matching command CTRL+s and CTRL +r Similar, just forward to retrieve Alt+<History list the first Alt+>History list last item Ctrl+F cursor moves forward one character, equivalent toCtrl+B cursor moves backward one character, quite with <-Alt+F cursor moves forward one word alt+b The cursor moves backwards a word ls!$ executes command ls, and the parameter of the above command is its argument ctrl+a moves to the beginning of the current line CTRL+e moves to the end of the current line ESC+b Move to the beginning of the current word ESC+F moves to the end of the current word Ctrl+l Clear Screen Ctrl+u cut all characters before the cursor in the command line (excluding itself) Ctrl+K cut all characters (including themselves) after the cursor in the command line Ctrl+D Remove the character CTRL where the cursor is located+h Delete the previous character where the cursor is located CTRL+y Paste the character you just deleted ctrl+W cut a word before the cursor (with a space, punctuation, etc. as a delimiter) Alt+d The word ESC after the cut cursor+W Delete the character before the cursor to its end (separated by spaces, punctuation, etc.) Ctrl+T reverses the position of the cursor and its previous character, and moves the cursor to the next character Alt+T swaps the current position with the previous word alt+u convert the current word to uppercase Alt+L CONVERT the current word to lowercase alt+C Turn the current word into the first character capital Ctrl+v inserting special characters, such as ctrl+v+tab JOIN TAB key ESC+T reverses the position of the cursor and its adjacent words Ctrl+C Delete entire row ctrl+(x u) hold down CTRL and press X and u again to undo the action you just made CTRL+s hangs current Shellctrl+Q re-enable the pending Shell[ctrl]+ [ALT] + [Backspace] =Kill 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. [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. [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. [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. [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. [Ctrl]+ [d] =Log Off (and close) from the shell prompt. With this shortcut, you don't have to type exit or logout. [Ctrl]+ [E] =move the cursor to the end of the line. It can be used in most text editors and Mozilla's URL fields. [Ctrl]+ [L] =clear the terminal. This shortcut works the same as typing clear at the command line. [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. [Middle mouse button]=pastes 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. [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. [Up] and [down] arrows=Displays the 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. Clear=clear the shell prompt screen. Typing it at the command line clears all the data displayed in this shell prompt screen. Exit=Log off. Type it in the shell prompt to log off the current user or root user account. history= Show command history. 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. Example: History 20. Reset=refreshes the shell prompt screen. If the character is not clear or garbled, typing this command at the shell prompt refreshes the screen. #Ctrl-u: Erases the previous section of a row of cursors. #Ctrl-h: Erases one character from the front of the cursor. #ctrl-d: Terminates the input. (Exit the shell if you are using the shell). #ctrl-c: Terminates the program that is currently running. #ctrl-z: Pauses the program. &"')#ctrl-s: Stops the output to the screen. #Ctrl-q: Re-activates the output to the screen. the default shell, ' Bash ', has historical editing and tab completion. #up-arrow: Start history Command search. #ctrl-r: Start the Incremental history command search, you can follow the keywords to find out which commands you have used. #TAB: Complete the input file name to the command line. #ctrl-v tab: Enter tab instead of extending the command line. #Ctrl + P-Previous command#Ctrl + N-Next command#Ctrl-u: Erases the previous section of a row of cursors. #Ctrl + Y-paste the previous Ctrl+u class command to remove the characters, is the paste is not undone Ah! The following application may be slightly advanced a little bit#!!-the previous command#!-n-Countdown nth History command#!-n:p-Print the previous command (not executed)# !? String -Latest command with "string"#!-n:gs/str1/str2/-Replaces the str1 of the reciprocal nth command with STR2 and executes (replaces the first only if no G is added)some other useful Linux command-line key combinations. 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#Ctrl + L-Clear screen#Ctrl + A-cursor moves to the beginning of the line#Ctrl + E-the cursor moves to the end of the line#Ctrl + W-clear the cursor before a word#Ctrl + K-Clears the character of the cursor to the end of the line#Ctrl + T-swap the first two characters of the cursor#Ctrl + V-Enter control word such as CTRL + V to enter ^m#Ctrl + F-Move the cursor back one character#Ctrl + B-cursor moves forward one character#Ctrl + H-delete one character before the cursor#N++f-The cursor is shifted by n words, and n is 1 can be omitted#N++b-Move the cursor forward n words, n is 1 can be omitted#Left-click-and-drag Mouse: Select and copy to Clipboard. #Click middle mouse button: Paste with the contents of the Clipboard. #Meta-key (Emacs terminology) is traditionally used in Left-alt-key

Shell 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.