Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I know some useful Bash shell shortcuts, and I am wondering if there are others. The ones I know:

  • CTRL + W: delete until beginning of word
  • CTRL + U: delete until beginning of line
  • Up / Down: navigate between previous commands

What I am especially curious are the following:

  • deleting until first "/" symbol or until the point CTRL + Left would go back
  • Searching in previous posts

And any other useful shortcuts, if any.

share|improve this question
add comment

closed as not constructive by Sathya Mar 5 '12 at 11:44

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.If this question can be reworded to fit the rules in the help center, please edit the question.

4 Answers

up vote 6 down vote accepted

All this can be found in the bash man page (or type man bash in a shell)

Info per section:

and some more

share|improve this answer
add comment

The keyboard shortcuts available to you depend on whether you're using bash in emacs mode (the default) or in vi mode. You can find out which mode you're using by executing

set -o

Look in the resulting list for the line beginning "vi" and see if it is "on" or "off". Then execute

man bash

and read the section on READLINE. There you will find description of at least those commands (what you call shortcuts) available in emacs mode.

share|improve this answer
add comment

Yyou can undo tab completion with Esc Backspace.

share|improve this answer
    
Do you mean Esc or do you mean Backspace or do you mean pressing both? –  Tom Wijsman Mar 5 '12 at 0:43
add comment

Alt+. to insert the last argument of the previous command.

Ctrl+r to search your history (though it's flaky)

History expansion in general (using !)

share|improve this answer
add comment

Not the answer you're looking for? Browse other questions tagged or ask your own question.