熟悉 Bash 快捷键来提高效率
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 快捷键来提高效率的更多相关文章
- [转]让你提升命令行效率的 Bash 快捷键
生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 编辑命令 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) ...
- 让你提升命令行效率的 Bash 快捷键
生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 编辑命令 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) ...
- 让你提升命令行效率的 Bash 快捷键 [完整版]
转自:http://linuxtoy.org/archives/bash-shortcuts.html 生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 大部分对其他 ...
- PHPstorm最常用的快捷键,提高开发效率
PHPstorm最常用的快捷键,提高开发效率 •ctrl+b 跳到变量申明处 •Ctrl + E 打开最近文件 •Ctrl + R 替换. •Ctrl + D 复制粘贴.将当前行或者选择的内容复制粘贴 ...
- 几个提高效率的PHOTOSHOP秘密快捷键
1.拖动选择 使用矩形选框工具,在画布上拖动(不要松开鼠标),这时按住空格键,然后移动鼠标,你会发现选区也跟着移动了. 2.左右流量文档 按住Cmd(Ctrl)键,上下滚动鼠标,你会发现文档的滚动条在 ...
- 提升命令行效率的Bash快捷键
转自:http://linuxtoy.org/archives/bash-shortcuts.html 生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 大部分对其他 ...
- 分享两个提高效率的AndroidStudio小技巧
这次分享两个 Android Studio 的小技巧,能够有效提高效率和减少犯错,尤其是在团队协作开发中. Getter 模板修改--自动处理 null 判断 格式化代码自动整理方法位置--广度 or ...
- 提高效率的Linux命令
提高效率的Linux命令 一.fc 二.disown 三.Ctrl + x +e 四.!! 两个感叹号 五.一次创建多个目录或文件 六.tee 七.删除从开头到光标处的命令文本 八.删除从光标到结尾处 ...
- [转]bash快捷键
生活在 Bash shell 中,熟记以下快捷键,将极大的提高你的命令行操作效率. 编辑命令 Ctrl + a :移到命令行首 Ctrl + e :移到命令行尾 Ctrl + f :按字符前移(右向) ...
随机推荐
- Jmeter(三十八) - 从入门到精通进阶篇 - 命令行运行JMeter详解(详解教程)
1.简介 前边一篇文章介绍了如何生成测试报告,细心地小伙伴或者同学们可以看到宏哥启动Jmeter生成测试报告不是在gui页面操作的,而是在gui页面设置好保存以后,用命令行来生成测试报告的.这一篇宏哥 ...
- 实践解析丨Rust 内置 trait:PartialEq 和 Eq
摘要:Rust 在很多地方使用了 traits, 从非常浅显的操作符重载, 到 Send, Sync 这种非常微妙的特性. Rust 在很多地方使用了 traits, 从非常浅显的操作符重载, 到 S ...
- Redis入门到放弃系列-redis安装
Redis是什么? Redis is an open source (BSD licensed), in-memory data structure store, used as a database ...
- Redis实战篇(二)基于Bitmap实现用户签到功能
很多应用上都有用户签到的功能,尤其是配合积分系统一起使用.现在有以下需求: 签到1天得1积分,连续签到2天得2积分,3天得3积分,3天以上均得3积分等. 如果连续签到中断,则重置计数,每月重置计数. ...
- 计算机体系结构——CH1基本概念
CH1基本概念 右键点击查看图像,查看清晰图像 CH1基本概念 目的与内容 了解计算机系统的完整概念 学习计算机系统的分析方法与设计方法 编写程序所必需了解的计算机属性 计算机系统结构简介 为什么要研 ...
- DFS 深搜专题 入门典例 -- 凌宸1642
DFS 深搜专题 入门典例 -- 凌宸1642 深度优先搜索 是一种 枚举所有完整路径以遍历所有情况的搜索方法 ,使用 递归 可以很好的实现 深度优先搜索. 1 最大价值 题目描述 有 n 件物品 ...
- Go + gRPC-Gateway(V2) 构建微服务实战系列,小程序登录鉴权服务:第一篇(内附开发 demo)
简介 小程序可以通过微信官方提供的登录能力方便地获取微信提供的用户身份标识,快速建立小程序内的用户体系. 系列 云原生 API 网关,gRPC-Gateway V2 初探 业务流程 官方开发接入文档 ...
- 【数据结构与算法笔记04】对图搜索策略的一些思考(包括DFS和BFS)
图搜索策略 这里的"图搜索策略"应该怎么理解呢? 首先,是"图搜索",所谓图无非就是由节点和边组成的,那么图搜索也就是将这个图中所有的节点和边都访问一遍. 其次 ...
- SpringCloudAlibaba—微服务概念及SpringCloudAlibaba介绍
目录 1.1 系统架构演变 1.1.1 单体应用架构 1.1.2垂直应用架构 1.1.3 分布式架构 1.1.4 SOA架构 1.1.5 微服务架构 1.2 微服务架构介绍 1.2.1 微服务架构的常 ...
- OO_Unit1_Summary
经历了十分充实(痛不欲生)的三周不一样的码代码的生活,让我对通宵oo有了新的认识.往届学长学姐诚不欺我 第一次作业 需求分析 第一次需求非常简单(相比较后两次作业而言),仅为简单多项式求导,而且仅包含 ...