A few people have asked about the command line recently. Here are some common keyboard shortcuts that make using the command line much faster:
- ctrl + a – move to beginning of line
- ctrl + e – move to end of line
- ctrl + k – delete to end of line
- ctrl + u – delete to beginning of line
- alt + b – move back one word
- alt + f – move forward one word
- alt + d – delete one word forward
- ctrl + p and ctrl + n – move up and down through command history (also ↑ and ↓)
- ctrl + r – search through previously-typed commands
- ctrl + x + u – undo
-
ctrl + x + e – open the current line in a text editor (uses
$EDITOR
– probably vim by default)
Those work in Linux and probably on Windows if you’re using bash. I’m not sure how alt is handled on Mac.
If anyone has other tips for using the command line more quickly, post them below.