码迷,mamicode.com
首页 > 系统相关 > 详细

Linux Bash 命令行快捷键小结

时间:2019-06-04 19:21:24      阅读:116      评论:0      收藏:0      [点我收藏+]

标签:大小   交换   内容   font   一个   ctr   命令行   lin   tab   

编辑命令

                光标移动                                                                        删除

                Ctrl + a                                   行首                                            Ctrl + u

                Ctrl + e                                   行尾                                            Ctrl + k

                Ctrl + xx                                 当前字符和行首之间                                                     

                Ctrl + f     →                          下一个字符 

                                                                 当前字符                                  Ctrl + d           

                Ctrl + b   ←                           上一个字符                                   Ctrl + h

                Alt + b                                    单词词首                                     Ctrl + w / Alt + Backspace

                Alt + f                                     单词词尾                         Alt + d               

 

     粘贴

     Ctrl + y                                   将删除的内容粘贴到当前字符后               

 

               前后交换

               Ctrl + t                                     字符交换(与前面的字符)      

               Alt + t                                      单词交换(与前面的单词)             

               

                大小写替换

                Alt + c                                      当前字符大写                   

                Alt + u                                      当前字符至词尾大写    

                Alt + l                                       当前字符至词尾小写  

 

控制命令

    Ctrl + l                                    清屏  clear

    Ctrl + s                                   锁终端

    Ctrl + q                                   解锁终端

    Ctrl + o                                   另起一行

    Ctrl + z                                   挂起命令

    Ctrl + c                                   终止命令

    Ctrl + i                                    Tab

 

历史命令

    Ctrl + p  ↑                                           显示上一条    

    Ctrl + n  ↓                                           显示下一条           

    !!                                                         执行上一条命令

    !comm                                                执行最近以comm开头的命令

    Alt + .   ESC + .   !$                             显示上一条命令的最后一个参数

    !*                                                         显示上一条命令的所有参数   

    !$:p                                                      显示!$(!$在句首会执行)

    !ca:p                                                    显示最近以ca开头的命令

    !*:p                                                      显示所有参数(!*在句首会执行)

    ^comm                                               删除上一条命令字符串的comm,并执行其他部分

    ^comm^foo                                       将上一条命令字符串的第一处comm替换为foo并执行

    ^comm^foo^                                    将上一条命令字符串的所有comm替换为foo并执行

    Ctrl + r                                                逆向搜索

    Ctrl + g                                               退出搜索


控制命令

    Ctrl + l                                                    清屏  clear

    Ctrl + s                                                   锁终端

    Ctrl + q                                                   解锁终端

    Ctrl + o                                                   另起一行

    Ctrl + z                                                   挂起命令

    Ctrl + c                                                   终止命令

    Ctrl + i                                                    Tab

 

 

 

 

Linux Bash 命令行快捷键小结

标签:大小   交换   内容   font   一个   ctr   命令行   lin   tab   

原文地址:https://www.cnblogs.com/ant-colonies/p/10975309.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!