删除
Ctrl+u 删除光标前所有字符
Ctrl+k 删除光标即光标之后所有字符
- Ctrl+d 删除光标所指字符
- Ctrl+h 删除光标前一个字符
Ctrl+w 删除光标所指的单词的光标之前的部分或者光标之前的单词
- Ctrl+y 复制,可以复制Ctrl+w u k删除的字符
移动
Ctrl+a 到行首
Ctrl+e 到行尾
- Ctrl+xx 光标在行首和当前光标间交换
- Ctrl+b 前移一个字符
- Ctrl+f 后移一个字符
控制
- Ctrl+z 挂起进程执行SIGTSTP ; 可以使用bg转为后台执行 fg转为前台执行 或者 KILL -SIGCONT pid 后台执行
[root@VM-16-2-centos ~]
^Z
[1]+ Stopped tail -f /dev/null
[root@VM-16-2-centos ~]
[1]+ Stopped tail -f /dev/null
[root@VM-16-2-centos ~]
root 228476 220586 0 08:32 pts/0 00:00:00 tail -f /dev/null
[root@VM-16-2-centos ~]
[root@VM-16-2-centos ~]
[1]+ Running tail -f /dev/null &
[root@VM-16-2-centos ~]
[root@VM-16-2-centos ~]
[1]+ Stopped tail -f /dev/null
- Ctrl+c 发送 SIGINT 信号给前台进程组中的所有进程,强制终止程序的执行
- Ctrl+d 当shell为空时,相当于exit;也表示EOF
- Ctrl+s 阻止屏幕输出
- Ctrl+q 继续屏幕输出
- Ctrl+l 清屏相当于clear
- Ctrl+r 搜索历史执行命令
- Ctrl+m 等于回车
- Ctrl+z 暂停指令运行
- stty -a 查看当前的一些快捷键
其他
- Shift+Page Up|Down :纯命令行来回翻页