转载自:
http://www.dbanotes.net/techmemo/shell_shortcut.html
这篇
Bash Shell Shortcuts 的快捷键总结的非常好。值得学习。下面内容大多数是拷贝粘贴与总结.
CTRL 键相关的快捷键:
Ctrl + a - Jump to the start of the line
Ctrl + b - Move back a char
Ctrl + c - Terminate the command //用的最多了吧?
Ctrl + d - Delete from under the cursor
Ctrl + e - Jump to the end of the line
Ctrl + f - Move forward a char
Ctrl + k - Delete to EOL
Ctrl + l - Clear the screen //清屏,类似 clear 命令
Ctrl + r - Search the history backwards //查找历史命令
Ctrl + R - Search the history backwards with multi occurrence
Ctrl + u - Delete backward from cursor // 密码输入错误的时候比较有用
Ctrl + xx - Move between EOL and current cursor position
Ctrl + x @ - Show possible hostname completions
Ctrl + z - Suspend/ Stop the command
补充:
Ctrl + h - 删除当前字符
Ctrl + w - 删除最后输入的单词
ALT 键相关的快捷键:
平时很少用。有些和远程登陆工具冲突。
Alt + < - Move to the first line in the history
Alt + > - Move to the last line in the history
Alt + ? - Show current completion list
Alt + * - Insert all possible completions
Alt + / - Attempt to complete filename
Alt + . - Yank last argument to previous command
Alt + b - Move backward
Alt + c - Capitalize the word
Alt + d - Delete word
Alt + f - Move forward
Alt + l - Make word lowercase
Alt + n - Search the history forwards non-incremental
Alt + p - Search the history backwards non-incremental
Alt + r - Recall command
Alt + t - Move words around
Alt + u - Make word uppercase
Alt + back-space - Delete backward from cursor // SecureCRT 如果没有配置好,这个就很管用了。
其他特定的键绑定:
输入 bind -P 可以查看所有的键盘绑定。这一系列我觉得更为实用。
Here "2T" means Press TAB twice
$ 2T - All available commands(common) //命令行补全,我认为是 Bash 最好用的一点
$ (string)2T - All available commands starting with (string)
$ /2T - Entire directory structure including Hidden one
$ ./2T - Only Sub Dirs inside including Hidden one
$ *2T - Only Sub Dirs inside without Hidden one
$ ~2T - All Present Users on system from "/etc/passwd" //第一次见到,很好用
$ $2T - All Sys variables //写Shell脚本的时候很实用
$ @2T - Entries from "/etc/hosts" //第一次见到
$ =2T - Output like ls or dir //好像还不如 ls 快捷
补充:
Esc + T - 交换光标前面的两个单词
很多来自
GNU 的 readline 库。
另外一份总结也很好
记忆是所有技术人员的敌人。一次要把所有的都记住是不可能的。针对自己的使用习惯,对少数快捷键反复使用,短期内就会有效果。
你还知道那些好用的快捷键 ? 补充一下 ?
--EOF--
分享到:
相关推荐
如果您是频繁使用Shell的用户,则BASH快捷方式将使您能够使用有意义的关键字(快捷方式)来引用冗长的目录路径,从而帮助您在频繁访问的目录之间顺畅快速地导航。
Bash-Terminal-Keyboard-Shortcuts-for-Navigation.pdf
Bash-Terminal-Keyboard-Shortcuts-for-History.pdf
Bash-Terminal-Keyboard-Shortcuts-for-Editing.pdf
Bash-Terminal-Keyboard-Shortcuts-for-Information.pdf
Bash-Terminal-Keyboard-Shortcuts-for-Control-Process.pdf
60-Linux-Bash-Terminal-Keyboard-Shortcuts-1.pdf
bash-shortcuts-cheat-sheet:bashzsh的有用快捷方式
bash-history-cheat-sheet Emacs and Vi history editing keyboard shortcuts:
bash-vi-editing-mode-cheat-sheet Readline VI Editing Mode Cheat Sheet Default Keyboard Shortcuts for Bash
“ bashortcuts”或bash-shortcuts是一个瘦小的python脚本,可帮助构建个性化的inputrc,这是GNU Readline的定制配置,GNU Readline是bash和大多数其他Shell使用的与输入相关的库。 另外,它使定义宏很容易,这些宏...
Django Admin键盘快捷键实验 将此应用视为被放弃的实验。 不要在生产中使用它。 此实验的目的是为您的... 在您的项目设置中,在django.contrib.admin之前将admin_keyboard_shortcuts添加到您的INSTALLED_APPS ..代码
Apply useful keyboard shortcuts in shell Employ redirection and pipes to process data Write both basic and advanced shell scripts to automate tasks Authors Vivek N Vivek N is a self-taught programmer ...
~/david/code/git-shortcuts/git-shortcuts.bash 快捷方式概述 大多数情况下,当我使用 git 时,我发现我使用的是短暂的功能分支和一个单一的头,master。 为了帮助使一些最重复的功能运行得更快一些,我在我的.bash...
The same line editing as Bash (from GNU’s Readline library). History persistence between sessions. Context sensitive completion; Executables (and aliases). Directory commands. Environment variables ...
Make things even faster by customizing your environment, creating shortcuts, and integrating other tools into your environment. Hands-on activities and exercises will cement your newfound knowledge ...
.alias-shortcuts别名, .alias-shortcuts了导航 .alias-sqlplus数据库相关的别名 .bashrc -bash非交互式会话启动命令 .exports -shell变量变量 .export.local.%hostname% -本地Shell变量 .vimrc -vim配置 .func
You will understand how PyCharm works underneath and how plugins such as Codemap, Vim, Bitbucket, Assets compressor, markdown, bash file, shortcut translator, and .gitignore leverage the power of the...
bash和zsh 将以下内容添加到您的~/.bashrc或~/.zshrc : eval "$(leader init)" 这将安装Leader并将其绑定到\ 。 鱼 将以下内容添加到您的~/.config/fish/config.fish : leader init | source 这会将leader安装...
关于此回购包含供我个人使用的点文件欢迎提出... (不要与~/.extra混淆)丢失的用别名Bash学分该项目最初受启发,现在基于Panda Syntax调色板。 配置文件的灵感来自LukeSmithxyz / voidrice和paulirish / dotfiles 。