TTY 快捷键


快捷键 描述 注意事项
Ctrl+Shift+Backspace 删除行左 不适用于 Linux、Mac 和 Windows
Ctrl+Shift+Delete 删除行右 不适用于 Mac
Ctrl+C 触发 SIGINT 或关闭逐行读取实例
Ctrl+H 删除左边
Ctrl+D 如果当前行为空或 EOF,则向右删除或关闭逐行读取实例 不适用于 Windows
Ctrl+U 从当前位置删除到行首
Ctrl+K 从当前位置删除到行尾
Ctrl+A 转到行首
Ctrl+E 转到行尾
Ctrl+B 后退一个字符
Ctrl+F 前进一个字符
Ctrl+L 清屏
Ctrl+N 下一个历史子项
Ctrl+P 上一个历史子项
Ctrl+Z 将正在运行的进程移到后台。 输入 fg 并按 回车键 返回。 不适用于 Windows
Ctrl+WCtrl +退格键 向后删除到单词边界 Ctrl+退格键 不适用于 Linux、Mac 和 Windows
Ctrl+Delete 向前删除到单词边界 不适用于 Mac
Ctrl+左箭头Meta+B 左边的单词 Ctrl+左箭头 不适用于 Mac
Ctrl+右箭头Meta+F 右边的单词 Ctrl+右箭头 不适用于 Mac
Meta+DMeta +删除键 删除右边的单词 Meta+删除键 不适用于 Windows
Meta+退格键 删除左边的单词 不适用于 Mac
Keybindings Description Notes
Ctrl+Shift+Backspace Delete line left Doesn't work on Linux, Mac and Windows
Ctrl+Shift+Delete Delete line right Doesn't work on Mac
Ctrl+C Emit SIGINT or close the readline instance
Ctrl+H Delete left
Ctrl+D Delete right or close the readline instance in case the current line is empty / EOF Doesn't work on Windows
Ctrl+U Delete from the current position to the line start
Ctrl+K Delete from the current position to the end of line
Ctrl+A Go to start of line
Ctrl+E Go to to end of line
Ctrl+B Back one character
Ctrl+F Forward one character
Ctrl+L Clear screen
Ctrl+N Next history item
Ctrl+P Previous history item
Ctrl+Z Moves running process into background. Type fg and press Enter to return. Doesn't work on Windows
Ctrl+W or Ctrl +Backspace Delete backward to a word boundary Ctrl+Backspace Doesn't work on Linux, Mac and Windows
Ctrl+Delete Delete forward to a word boundary Doesn't work on Mac
Ctrl+Left arrow or Meta+B Word left Ctrl+Left arrow Doesn't work on Mac
Ctrl+Right arrow or Meta+F Word right Ctrl+Right arrow Doesn't work on Mac
Meta+D or Meta +Delete Delete word right Meta+Delete Doesn't work on windows
Meta+Backspace Delete word left Doesn't work on Mac