0

When I was using Linux before I remember that I had a pretty useful shortcut. It was Ctrl+ (There was also Ctrl+ which did the opposite way) and it worked as follows: For example I typed /he in the terminal (without pressing ENTER). If I press CTRL+UP it shows the last command that was ran with prefix /he. If I press again, it will go up and up in the history commands. Example:

> history
cat text1.txt
cat text2.txt
cat text3.txt

If I write cat in the terminal and click Ctrl+ it will switch to cat text3.txt and if I press again it will switch to cat text2.txt. Is there some similar shortcut in Ubuntu?

0
## arrow up
"\e[A":history-search-backward
## arrow down
"\e[B":history-search-forward

From Bash history search, partial + up-arrow

Is this what you were looking for?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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