Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
In Windows command prompt, I can type a word and hit F8 to iterate the history of that word. For example, if I type "java ThisProgram" and then later type "java "ThatProgram" I can just enter "java" and hit F8 and it will cycle through those 2 entries and complete the statements on the command line.
I was wondering if there is anything like this in the bash shell on Linux. I know about up/down arrow keys and this is useful, but I am very used to F8.
For example....
If I run these commands.
cd /home/stuff
ls -al
cd /root
ls -l
cd /mnt/tech
ls -r
then I can use the command: Ctrl r
and if I type l it comes up with the last command which started with l
pressing the Ctrl r again finds the previous command which started with l
.....
Hmmmm... Well that functionality is what I am looking for, but when I do CTRL-R I get a message, "(reverse-i-search)" What am I missing? Do I need a key mapping or something?
After you do Ctrl r then you type in the search word or even just part of it and the reverse search will find the last instance of that word or letter. Pressing Ctrl r again finds the next previous instance of that word or letter.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.