跳转到内容

Bash快捷键

Terminal window
Ctrl + b - Move back a char
Ctrl + c - Terminate the command //用的最多了吧?
用ctrl+\吧,这个是退出信号,ctrl+C是中断信号
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 命令
Ctrl + r - Search the history backwards //查找历史命令
Ctrl + R - Search the history backwards with multi occurrence
Ctrl + u - Delete backward from cursor // 密码输入错误的时候比较有用
Ctrl + xx - Move between EOL and current cursor position
Ctrl + x @ - Show possible hostname completions
Ctrl + z - Suspend/ Stop the command
补充:
Ctrl + h - 删除当前字符
Ctrl + w - 删除最后输入的单词
Terminal window
alt+> move to the last line of history
alt+? show current completion list
alt+* insert all possible completion
alt+/ attempt to complete filename yank last argument to previous command
alt+. alt+c capitalize the word
alt+d delete word
alt+f move forward
alt+b move backward
alt+l make word lowercase search the history forwards nonincremental
alt+n search the history backwards nonincremental
alt+p alt+r recall command
alt+t move word around
alt+u make word uppercase
alt + delete backwards from cursor
Terminal window
esc+t transpose two adjacent words
esc+b move backward a word
esc+f move forward a word
esc+d delete from the cursor position to the end of the word