Xshell shortcut keys (very practical)

Source: Internet
Author: User
Tags clear screen eol lowercase mongodb postgresql redis

[shortcut keys for]xshell (very practical)2014-03-20 11:24:06 Admin Comment Read review 2479 people read


Delete
CTRL + D deletes the character at the cursor location equivalent to VIM x or DL
CTRL + H deletes the character in front of the cursor, which corresponds to the HX or DH in vim.
Ctrl + K Delete all characters after cursor equals vim d shift+$
CTRL + U delete all characters in front of the cursor equal to VIM D shift+^
CTRL + W DELETE cursor before a word equals vim in db
Ctrl + Y restores the characters that were deleted when Ctrl+u was last executed
CTRL +? Undo previous input
ALT + R undo Previous action
ALT + D Delete the word after the cursor position

Move
CTRL + A moves the cursor to the beginning of the command line equivalent to Vim shift+^
CTRL + E moves the cursor to the end of the command line at the equivalent of vim shift+$
CTRL + F cursor moves backwards one character equivalent to Vim in L
CTRL + B cursor moves forward one character equivalent to Vim in H
CTRL + ARROW key left cursor moves to the beginning of the previous word
CTRL + ARROW key right cursor moves to the end of the next word
CTRL + X jumps between the last character of the cursor and the character at which the current cursor is located
ALT + F jumps to the end of the word at the cursor position


Replace
CTRL + T replaces the current character of the cursor with one of the preceding characters
ALT + T swap two cursor at the current position of the word and the previous word of the cursor
ALT + U change the current position of the cursor to uppercase
ALT + L CHANGE the current position of the cursor to lowercase
ALT + C capitalizes the first letter of a word in the current position of the cursor
^oldstr^newstr Replace string in previous command

History command Edit
CTRL + P returns the last input command character
CTRL + R Enter Word search history command
ALT + P input character find history command close to Word typeface
ALT + > return to last Execute command

Other
CTRL + S lock Terminal
CTRL + Q unlock Terminal
CTRL + L clear screen equivalent to command clear
CTRL + C from another line
CTRL + I similar to tab completion function
CTRL + O repeat command
ALT + Number key operation number of times actual operation: #c +l Clear Screen first
MINUIT@SUSE:~>STR1 str2 str3 #Enter three words and find the first word needs to be capitalized. Press c + a Jump to the beginning press A + c

minuit @ suse: ~> Str1 str2 str3 # 好 now the word becomes what it is now, and found the second word to all uppercase (such a command is really dead: () Well, if your current cursor is in the second word , that directly a + u the word change, if not, then hold c + a and then c + f jump to the second word, then A + u will be OK. The result is as shown below.

minuit @ suse: ~> Str1 STR2 str3 #I want to change it. My position is already in the last word. This is easy to hold. Hold down a + 2 + b haha jumped to the second word again a + l This second word is all lowercase .

Minuit @ suse: ~> Welcome to Chinaunix! # Isn't it just changing the case? Hold C + a and then a + 3 + c look at the effect.
Minuit @ suse: ~> Welcome to chinaunix! #GOOD very simple
Let's try the replacement again.
Minuit @ suse: ~> Welcome to chinaunix! #Still these three words c + a jumps to the beginning and then jumps to the second word (because a + t can only replace a word in front of it so you can't press a + t in the first word) to hold a + t
Minuit @ suse: ~> to Welcome chinaunix! # It's like this now. If I use it then press a + 2 + t, that's a change.
Minuit @ suse: ~> chinaunix! Welcome to # Ok, a little more commonly used
minuit @ suse: ~> ls / tmp / # Look at what is below
File1 file2 file3 ...
MINUIT @ SUSE: ~ & GT; ^ LS ^ CD #Now I want to enter the directory again. It is very simple to enter the replacement command. When the command is very long, this replacement can save a lot.
cd / tmp /
Minuit @ suse: / tmp> #Entered the tmp directory

Jump command will not try everyone's own experience can not see ^_^

------------------------------------------------------------------------------
Ctrl + A can quickly switch to the beginning of the command line
Ctrl + E To switch to the end of the command line
Ctrl + R to find in the history command
Ctrl + u Delete all characters before the cursor position
Ctrl + K deletes all characters after the cursor position
CTRL + W Deletes a word before the cursor
Ctrl + D ends current input, exits shell
CTRL + S can be used to stay in the current screen CTRL + Q recovery Brush screen
CTRL + L Clear Screen

CTRL key related shortcut keys:

Ctrl + A-jump to the start of the line
Ctrl + B-move back a char
Ctrl + c-terminate the command//use the most?
Ctrl + D-delete from under the cursor
Ctrl + E-jump to the end of the line
Ctrl + f-move forward a char
Ctrl + K-delete to EOL
Ctrl + l-clear The screen//clear, similar to the clear command
Ctrl + R-search The history backwards//Find historical command
Ctrl + R-search The backwards with multi occurrence
Ctrl + u-delete Backward from cursor//password input error when it is more useful
Ctrl + xx-move between EOL and current cursor position
Ctrl + x @-Show possible hostname completions
Ctrl + z-suspend/stop the command
Add:
Ctrl + H-delete the current character
Ctrl + W-delete the last word entered

ALT key related shortcut keys:

Seldom used in peacetime. Some conflicts with remote login tools.

Alt + <-Move to the first
Alt + >-Move to the last line in the
Alt +? -Show Current Completion list
ALT + *-Insert all possible completions
ALT +/-attempt to complete filename
Alt +. -Yank last argument to previous command
Alt + b-move Backward
Alt + C-capitalize The word
Alt + D-delete Word
Alt + F-move Forward
Alt + l-make Word lowercase
Alt + N-search The history forwards Non-incremental
Alt + P-search The history backwards Non-incremental
ALT + r-recall Command
Alt + t-move words around
ALT + u-make Word uppercase
Alt + back-space-delete Backward from cursor
SECURECRT if not configured properly, this will work.

Other specific key bindings:

Enter Bind-p to see all the keyboard bindings. I think this series is more practical.

Here "2T" means press TAB twice
$2t-all available commands (common)//command line completion, I think it's Bash's best use.
$ (String) 2t-all available commands starting with (string)
$/2t-entire directory structure including Hidden one
$./2t-only Sub Dirs inside including Hidden one
$ *2t-only Sub Dirs inside without Hidden one
$ ~2t-all Present Users on the system from "/etc/passwd"//first time seen, very useful
$ $2t-all Sys variables//very practical when writing shell scripts
$ @2t-entries from "/etc/hosts"//First time see
$ =2t-output like ls or dir//seems to be better than LS fast
Add:
ESC + T-swap two words in front of the cursor


Table 2-1 Navigating the command-line keystrokes


Hit key

Name

Meaning

Ctrl+f

Character Fu Xiangmai

Move one character forward

Ctrl+b

Character backwards

Move backward one character

Alt+f

Word forward

Move forward one word

Alt+b

Word backwards

Move one word backwards

CTRL + A

Outfit

To the beginning of the current line

Ctrl+e

End of Line

To the end of the line

Ctrl+l

Clear Screen

Clear the screen and leave a line at the top of the screen


The keystrokes in table 2-2 can be used to edit the command line.



Table 2-2                                                            Edit command-line keystrokes


Keystroke

Full name

Meaning

Ctrl+d

Delete current content

Delete current character

Backspace or rubout

Delete previous content

Delete previous character

Ctrl+t

Swap characters

Swap the position of the current character and the previous character

Alt+t

Swap word

Swap the position of the current word and the previous word

Alt+u

Uppercase word

Change the current word to uppercase

Alt+l

Lowercase words

Change the current word to lowercase

Alt+c

First uppercase

Capitalize the first letter of the current word

Ctrl + V

Insert special characters

Add special characters. For example, press Ctrl+v+tab to add a tab character


Use the keystrokes in table 2-3 to cut and paste text on the command line.



Table 2-3 keystrokes for cutting and pasting text on the command line


Hit key

Name

Meaning

Ctrl+k

Cut end of line

Cut text to the end of the line

Ctrl+u

Cut the Wardrobe

Cut the text to the beginning of the line

Ctrl+w

Cut a previous word

Cut a word before the cursor

Alt+d

Cut the next word

A word after clipping the cursor

Ctrl+y

Paste the most recent text

Paste the recently cut text

Alt+y

Paste an earlier text

Samsara to the previously cut text and paste it

CTRL + C

Delete entire row

Delete a whole row


Table 2-4 key combinations for text completion



Alibaba Cloud Hot Products

Elastic Compute Service (ECS) Dedicated Host (DDH) ApsaraDB RDS for MySQL (RDS) ApsaraDB for PolarDB(PolarDB) AnalyticDB for PostgreSQL (ADB for PG)
AnalyticDB for MySQL(ADB for MySQL) Data Transmission Service (DTS) Server Load Balancer (SLB) Global Accelerator (GA) Cloud Enterprise Network (CEN)
Object Storage Service (OSS) Content Delivery Network (CDN) Short Message Service (SMS) Container Service for Kubernetes (ACK) Data Lake Analytics (DLA)

ApsaraDB for Redis (Redis)

ApsaraDB for MongoDB (MongoDB) NAT Gateway VPN Gateway Cloud Firewall
Anti-DDoS Web Application Firewall (WAF) Log Service DataWorks MaxCompute
Elastic MapReduce (EMR) Elasticsearch

Alibaba Cloud Free Trail

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.