Practical Tips for Shell command line shortcuts in Linux

Source: Internet
Author: User
Tags eol
Article Title: practical tips for Shell command line shortcuts in Linux. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.

# Ctrl + A-Go to the beginning of the line you are currently typing on
 
# Ctrl + E-Go to the end of the line you are currently typing on
 
Switch to the start of the command line | End
 
# Ctrl + L-Clears the Screen, similar to the clear command
 
Clear screen, similar to the clear command
 
# Ctrl + U-Clears the line before the cursor position. If you are at the end of the line, clears the entire line.
 
Before clearing the cursor
 
# Ctrl + H-Same as backspace
 
Backspace
 
# Ctrl + R-Let's you search through previusly used commands
 
Find from the command history
 
# Ctrl + C-Kill whatever you are running
 
Termination command
 
# Ctrl + D-Exit the current shell
 
Exit shell
 
# Ctrl + Z-Puts whatever you are running into a suspended background process. fg restores it.
 
??
 
# Ctrl + W-Delete the word before the cursor
 
Before clearing the cursor
 
# Ctrl + K-Clear the line after the cursor
 
After the cursor is cleared
 
# Ctrl + T-Swap the last two characters before the cursor
 
# Esc + T-Swap the last two words before the cursor
 
Switch the last two letters (words) before the cursor)
 
# Alt + F-Move cursor forward one word on the current line
 
# Alt + B-Move cursor backward one word on the current line
 
?? On the ubuntu x windows terminal, you will switch to the menu! Tty may be fine.
 
# Tab-Auto-complete files and folder names
 
Auto-completion
 
# Ctrl + Y-to paste it (as in delete and copy) all text in front of the cursor
 
Paste (ctrl + w or ctrl + k)
 
# Esc +. (or Esc + Underscore)-Insert Last Argument
 
??
 
# Ctrl + B-Move back a character
 
# Ctrl + f-Move forward a character
 
Forward | move a letter behind
 
# Ctrl + r-Search the history backwards
 
??
 
# Ctrl + xx-Move between EOL and current cursor position
 
The cursor switches between the current position and EOL (EOL end of line? But in my experiment, I switched between the beginning and the current position. How can this problem be solved? Who knows ?)
 
# Ctrl + x @-Show possible hostname completions
 
# Alt +
 
# Alt +>-Move to the last line in the history
 
# Alt +? -Show current completion list
 
# Alt + *-Insert all possible completions
 
# Alt +/-Attempt to complete filename
 
# Alt +.-Yank last argument to previous command
 
# Alt + c-Capitalize the word
 
# Alt + d-Delete word
 
# 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
 
# Here "2 T" means Press TAB twice
 
#$2 T-All available commands (common)
 
# $ (String) 2 T-All available commands starting with (string)
 
#$/2 T-Entire directory structure including Hidden one
 
#$2 T-Only Sub Dirs inside including Hidden one
 
# $ * 2 T-Only Sub Dirs inside without Hidden one
 
# $ ~ 2 T-All Present Users on system from "/etc/passwd"
 
#$2 T-All Sys variables
 
# $ @ 2 T-Entries from "/etc/hosts"
 
# $ = 2 T-Output like ls or dir
 

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.