We help IT Professionals succeed at work.
Get Started

Linux console - "searching" your past command history

Last Modified: 2012-05-11
I can't believe that this is not doable.

I'm running Ubuntu Server 10.04 at home, and at work I run Debian Lenny.

Back in the DOS days, I could partially type a command, then hit the "F8" key, and if any command I had typed in my history matched what I was typing now it would auto-complete the command to what I had typed before.

Basically it was a quick way to search my history and repeat a command I typed before.

In linux, the "up arrow" method to traverse my history works, but I have no way to "autocomplete" what I'm typing. I usually have to run the "history" command, pipe it to grep, and then copy-paste whatever I see. That is so tedious it usually is worth it to just re-type the command.

Somebody tell me there's an easy way to accomplish the "F8" shortcut that I am so used to using from DOS.

Watch Question
This problem has been solved!
Unlock 2 Answers and 7 Comments.
See Answers
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE