Bash是GNU计划的一部分,是多数Linux发行版提供的默认Shell。 Linux的精髓就在于命令行的高效,而学习命令行的第一步便是学习如何快速地输入命令。

其实包括Bash在内的多数Linux Shell都是使用一个叫GNU Readline Library的库来接受用户输入。 所以这些快捷键在多数Shell下都适用~

命令编辑

快捷键 描述
Ctrl + a go to the start of the command line
Ctrl + e go to the end of the command line
Ctrl + k delete from cursor to the end of the command line
Ctrl + u delete from cursor to the start of the command line
Ctrl + w delete from cursor to start of word (i.e. delete backwards one word)
Ctrl + y paste word or text that was cut using one of the deletion shortcuts (such as the one above) after the cursor
Ctrl + xx move between start of command line and current cursor position aand back again
Alt + b move backward one word (or go to start of word the cursor is currently on)
Alt + f move forward one word (or go to end of word the cursor is currently on)
Alt + d delete to end of word starting at cursor (whole word if cursor is at the beginning of word)
Alt + c capitalize to end of word starting at cursor (whole word if cursor is at the beginning of word)
Alt + u make uppercase from cursor to end of word
Alt + l make lowercase from cursor to end of word
Alt + t swap current word with previous
Ctrl + f move forward one character
Ctrl + b move backward one character
Ctrl + d delete character under the cursor
Ctrl + h delete character before the cursor
Ctrl + t swap character under cursor with the previous one

历史命令

快捷键 描述
Ctrl + r search the history backwards
Ctrl + g escape from history searching mode
Ctrl + p previous command in history (i.e. walk back through the command history)
Ctrl + n next command in history (i.e. walk forward through the command history)
Alt + . use the last word of the previous command

命令控制

快捷键 描述
Ctrl + l clear the screen
Ctrl + s stops the output to the screen (for long running verbose command)
Ctrl + q allow output to the screen (if previously stopped using command above)
Ctrl + c terminate the command
Ctrl + z suspend/stop the command
Ctrl + d end of input

熟悉 Bash 快捷键来提高效率的更多相关文章

  1. [转]让你提升命令行效率的 Bash 快捷键

    生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 编辑命令 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) ...

  2. 让你提升命令行效率的 Bash 快捷键

    生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 编辑命令 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) ...

  3. 让你提升命令行效率的 Bash 快捷键 [完整版]

    转自:http://linuxtoy.org/archives/bash-shortcuts.html 生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 大部分对其他 ...

  4. PHPstorm最常用的快捷键,提高开发效率

    PHPstorm最常用的快捷键,提高开发效率 •ctrl+b 跳到变量申明处 •Ctrl + E 打开最近文件 •Ctrl + R 替换. •Ctrl + D 复制粘贴.将当前行或者选择的内容复制粘贴 ...

  5. 几个提高效率的PHOTOSHOP秘密快捷键

    1.拖动选择 使用矩形选框工具,在画布上拖动(不要松开鼠标),这时按住空格键,然后移动鼠标,你会发现选区也跟着移动了. 2.左右流量文档 按住Cmd(Ctrl)键,上下滚动鼠标,你会发现文档的滚动条在 ...

  6. 提升命令行效率的Bash快捷键

    转自:http://linuxtoy.org/archives/bash-shortcuts.html 生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 大部分对其他 ...

  7. 分享两个提高效率的AndroidStudio小技巧

    这次分享两个 Android Studio 的小技巧,能够有效提高效率和减少犯错,尤其是在团队协作开发中. Getter 模板修改--自动处理 null 判断 格式化代码自动整理方法位置--广度 or ...

  8. 提高效率的Linux命令

    提高效率的Linux命令 一.fc 二.disown 三.Ctrl + x +e 四.!! 两个感叹号 五.一次创建多个目录或文件 六.tee 七.删除从开头到光标处的命令文本 八.删除从光标到结尾处 ...

  9. [转]bash快捷键

    生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 编辑命令 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) ...

随机推荐

  1. Salesforce LWC学习(三十二)实现上传 Excel解析其内容

    本篇参考:salesforce lightning零基础学习(十七) 实现上传 Excel解析其内容 上一篇我们写了aura方式上传excel解析其内容.lwc作为salesforce的新宠儿,逐渐的 ...

  2. Spring Boot MVC 单张图片和多张图片上传 和通用文件下载

    @Autowired private ServerConfig serverConfig; /** * 通用下载请求 * * @param fileName 文件名称 * @param delete ...

  3. K8S 上部署 Redis-cluster 三主三从 集群

    介绍 Redis代表REmote DIctionary Server是一种开源的内存中数据存储,通常用作数据库,缓存或消息代理.它可以存储和操作高级数据类型,例如列表,地图,集合和排序集合. 由于Re ...

  4. 热更新应用--热补丁Hotfix学习笔记

    一.热补丁简介 热补丁主要是用于将纯C#工程在不重做的情况下通过打补丁的形式改造成具备lua热更新功能工程,主要是让原来脚本中Start函数和Update函数等函数代码块重定向到lua代码. 二.第一 ...

  5. 使用Vscode 开发调试 C/C++ 项目

    需要安装的扩展 C/C++ 如果是远程 Linux上开发还需要安装 Remote Development 创建工作目录后,代码远程克隆... 省略.. 创建项目配置文件,主要的作用是代码智能提示,错误 ...

  6. [图论]剑鱼行动:kruskal

    剑鱼行动 目录 剑鱼行动 Description Input Output Sample Input Sample Output 解析 难点 代码 Description 给出N个点的坐标,对它们建立 ...

  7. 运行ASP.NET程序(4)

    运行ASP.NET程序有两种方式: 直接点击如图标志的按钮可直接运行,还可以选择浏览器 第二种:F5 两者没区别,看个人习惯

  8. 【DB宝47】企业知识分享+团队协作神器之Confluence

    目录 一.Confluence简介 二.知识库软件对比 三.快速安装confluence 7.4.6版本 四.confluence基本操作简介 4.1.创建空间(Space) 4.2.配置空间权限 4 ...

  9. 敏捷史话(十四):敏捷之峰的攀登者 —— Jim Highsmith

    "我们希望,一起组成的敏捷联盟能够帮助到其他同行,帮他们用新的更'敏捷'的方式去思考软件开发.方法论和组织.做到这一点,我们就得偿所愿了."Jim Highsmith 在雪鸟会议结 ...

  10. Java(1-24)【前言、入门程序、常量、变量、类型转换】

    如何输出规定结果,利用String.format System.out.println(String.format("%.2f", f)); 编译:是指将我们编写的Java源文件翻 ...